Fix merge #399
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
| # This is the main CI workflow that runs the test suite on all pushes to main and all pull requests. | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - crates/** | |
| - Cargo.toml | |
| - Cargo.lock | |
| - Dockerfile | |
| pull_request: | |
| paths: | |
| - crates/** | |
| - Cargo.toml | |
| - Cargo.lock | |
| - Dockerfile | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| name: unit-tests | |
| jobs: | |
| required: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| env: | |
| POSTGRES_USER: dev | |
| POSTGRES_PASSWORD: dev | |
| POSTGRES_DB: dev | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U dev" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| name: ubuntu / ${{ matrix.toolchain }} | |
| strategy: | |
| matrix: | |
| # run on stable and beta to ensure that tests won't break on the next version of the rust | |
| # toolchain | |
| toolchain: [stable] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Install ${{ matrix.toolchain }} | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo test | |
| env: | |
| COLUMNS: "80" | |
| run: | | |
| export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld" | |
| cargo test --profile=ci --workspace --all-targets | |
| cargo test --profile=ci --workspace --lib --features=state-store-query-test tests::statestore_queries_unittest |