fix: Fix test/build workflow. It doesn't do integration tests now #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cargo Build & Test | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build_and_test: | |
| name: etcd_fdw Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache build/deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache pgrx | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.pgrx/ | |
| key: pgrx-0.16.0 | |
| - name: Install latest stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| components: rustfmt, clippy | |
| - run: apt update | |
| - run: apt install build-essential bison flex clang protobuf-compiler -y | |
| - name: Create user | |
| run: | | |
| useradd -m test_user | |
| - run: sudo -u test_user cargo install cargo-pgrx --version 0.16.0 | |
| - run: sudo -u test_user cargo pgrx init | |
| - run: sudo -u test_user cargo build --verbose | |
| - run: sudo -u test_user cargo test --verbose | |