Skip to content

Commit

Permalink
update CI to address MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Mar 1, 2024
1 parent 2dbac5f commit ebad289
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 20 deletions.
52 changes: 33 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,28 @@ jobs:
steps:
- run: exit 0

setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.setup-matrix.outputs.matrix }}
steps:
- id: get-msrv
uses: actions/checkout@v2
run: |
echo "MSRV=$(grep -oP 'rust-version\s*=\s*"\K[^"]+' ./refinery/Cargo.toml)" >> "$GITHUB_ENV"
- id: setup-matrix
uses: druzsan/setup-matrix@v2
with:
# Use | to preserve valid YAML syntax
matrix: |
rust: [stable, nightly, ${{ steps.get-msrv.outputs.MSRV }}]
cargo-fmt-clippy-and-test-macros-and-cli:
name: Cargo fmt/clippy/test-macros-and-cli
runs-on: ${{ matrix.os }}
needs: setup-matrix
runs-on: [windows-latest, ubuntu-latest]
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
rust: [stable, nightly, 1.56.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -33,19 +48,18 @@ jobs:
- run: rustup component add clippy
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features
- run: cd refinery_core && cargo test --all-features -- --test-threads 1
- run: cd refinery && cargo build --all-features
- run: cd refinery_macros && cargo clippy
- run: cd refinery_cli && cargo clippy
- run: cd refinery_macros && cargo test
- run: cd refinery_cli && cargo test

test-sqlite:
name: Test Sqlite
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.65.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -56,10 +70,10 @@ jobs:

test-postgres:
name: Test postgres
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
services:
postgres:
image: postgres:9.6.13-alpine
Expand All @@ -75,10 +89,10 @@ jobs:

test-tokio-postgres:
name: Test tokio-postgres
runs-on: ubuntu-latest
needs: setup-matrix
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6.13-alpine
Expand All @@ -93,10 +107,10 @@ jobs:

test-mysql:
name: Test mysql
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
services:
postgres:
image: mysql:latest
Expand All @@ -117,10 +131,10 @@ jobs:

test-mysql-async:
name: Test mysql-async
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
services:
postgres:
image: mysql:latest
Expand All @@ -140,10 +154,10 @@ jobs:

test-tiberius:
name: Test tiberius
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
Expand Down
2 changes: 1 addition & 1 deletion refinery/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "refinery"
version = "0.8.12"
rust-version = "1.56"
rust-version = "1.75"
authors = ["Katharina Fey <[email protected]>", "João Oliveira <[email protected]>"]
license = "MIT"
description = "Powerful SQL migration toolkit for Rust"
Expand Down

0 comments on commit ebad289

Please sign in to comment.