CI #104
This file contains 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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "17 3 * * *" | |
jobs: | |
expect: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: ["1.81.0", "stable", "beta", "nightly"] | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
# Run two tests to ensure that the output is consistent | |
- name: clippy on just the library should have no warnings | |
run: cargo clippy --all-features --lib | |
env: | |
RUSTFLAGS: "-D warnings" | |
- name: Run cargo check simple comparison | |
run: ./tests/compare-output.sh "check --all-features --test simple" "tests/check-expect-supported-simple.out" | |
- name: Run cargo check submod comparison | |
run: ./tests/compare-output.sh "check --all-features --test submod" "tests/check-expect-supported-submod.out" | |
- name: cargo clean | |
run: cargo clean | |
- name: Run cargo clippy simple comparison | |
run: ./tests/compare-output.sh "clippy --all-features --test simple" "tests/clippy-expect-supported-simple.out" | |
- name: Run cargo clippy submod comparison | |
run: ./tests/compare-output.sh "clippy --all-features --test submod" "tests/clippy-expect-supported-submod.out" | |
- name: cargo clean | |
run: cargo clean | |
- name: cargo test | |
run: cargo test --all-targets | |
allow-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: ["1.43.0", "1.80.0"] | |
env: | |
RUSTFLAGS: "-D warnings" | |
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
steps: | |
# clippy+rustversion only works with clippy >= 1.64.0 | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: cargo check | |
run: cargo check --all-targets --all-features | |
- name: cargo clean | |
run: cargo clean | |
- name: cargo test | |
run: cargo test --all-targets --all-features | |
allow-clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: ["1.64.0", "1.80.0"] # clippy+rustversion only works with clippy >= 1.64.0 | |
env: | |
RUSTFLAGS: "-D warnings" | |
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
- name: cargo check | |
run: cargo check --all-targets --all-features | |
- name: cargo clean | |
run: cargo clean | |
- name: cargo clippy | |
run: cargo clippy --all-targets --all-features | |
- name: cargo clean | |
run: cargo clean | |
- name: cargo test | |
run: cargo test --all-targets --all-features | |
ignore-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: ["1.38.0", "1.42.0"] | |
env: | |
CARGO_NET_GIT_FETCH_WITH_CLI: "true" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Run cargo check simple comparison | |
run: ./tests/compare-output.sh "check --all-features --test simple" "tests/check-expect-ignored-simple.out" | |
- name: cargo clean | |
run: cargo clean | |
- name: cargo test -- simple | |
run: cargo test -- simple |