Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few CI improvements #62

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,23 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust: [nightly, beta, stable]
rust: [nightly, stable]
steps:
- uses: actions/checkout@v4

- name: Install latest ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
toolchain: ${{ matrix.rust }}
targets: x86_64-pc-windows-gnu, wasm32-unknown-unknown

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests --all-features
run: cargo check --all --bins --examples --tests --all-features

- name: Run cargo check for WASM
run: cargo check --all --all-features --target wasm32-unknown-unknown

- name: Run cargo check (without dev-dependencies to catch missing feature flags)
if: startsWith(matrix.rust, 'nightly')
uses: actions-rs/cargo@v1
with:
command: check
args: -Z features=dev_dep
run: cargo check -Z features=dev_dep

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test
14 changes: 6 additions & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -W clippy::all
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt -- --check
- name: Catch common mistakes and unwrap calls
run: cargo --locked clippy --all-features -- -W clippy::all
Loading