From 52878ac326f97aa7f5bc6a60b072307d306e6b32 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 | 51 ++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e2ff06..1b96c52 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,39 @@ 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 }} + rustup component add rustfmt + rustup component add clippy - name: Check - uses: actions-rs/cargo@v1 - with: - command: check - - name: Lint - run: cargo clippy --all --all-features -- -D warnings + 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