From 4f0c7ae654a623582689d2c8b67f2826443cd58b Mon Sep 17 00:00:00 2001 From: pawurb Date: Wed, 9 Oct 2024 11:20:27 +0200 Subject: [PATCH] CI improvements --- .github/workflows/ci.yml | 43 ++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e2ff06..d684c94 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,15 @@ on: jobs: build: + name: test ${{ matrix.rust }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rust: ["stable", "beta", "nightly"] steps: - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable - name: Run PostgreSQL 12 run: | docker run --env POSTGRES_USER=postgres \ @@ -56,50 +62,35 @@ jobs: -d -p 5437:5432 postgres:17.0-alpine \ postgres -c shared_preload_libraries=pg_stat_statements sleep 15 - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - name: Set up Rust + - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} - name: Check - uses: actions-rs/cargo@v1 - with: - command: check + run: cargo check + - name: Fmt + run: cargo fmt --all --check - name: Lint run: cargo clippy --all --all-features -- -D warnings - name: Run tests for PG 12 env: PG_VERSION: 12 - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: Run tests for PG 13 env: PG_VERSION: 13 - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: Run tests for PG 14 env: PG_VERSION: 14 - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: Run tests for PG 15 env: PG_VERSION: 15 - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: Run tests for PG 16 env: PG_VERSION: 16 - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: Run tests for PG 17 env: PG_VERSION: 17 - uses: actions-rs/cargo@v1 - with: - command: test \ No newline at end of file + run: cargo test \ No newline at end of file