Skip to content

Commit

Permalink
maint/CI ~ fix and polish CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed May 27, 2023
1 parent 9c2538a commit fbc49e5
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@

on: [push, pull_request]

name: Basic CI
name: CI

jobs:
fmt:
name: cargo fmt
runs-on: ubuntu-latest
clippy:
name: cargo clippy
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
Expand All @@ -20,15 +23,13 @@ jobs:
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install ${TOOLCHAIN} -c rustfmt --profile minimal
rustup default ${TOOLCHAIN}
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
- run: rustup component add clippy
- run: cargo clippy -- -D warnings
- run: cargo clippy --examples -- -D warnings

clippy:
name: cargo clippy
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
Expand All @@ -40,16 +41,15 @@ jobs:
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install ${TOOLCHAIN} -c rustfmt --profile minimal
rustup default ${TOOLCHAIN}
- run: rustup component add clippy
- run: cargo clippy -- -D warnings
- run: cargo clippy --examples -- -D warnings
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check

test:
name: cargo test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install `rust` toolchain
Expand All @@ -61,7 +61,7 @@ jobs:
rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt}
rustup toolchain install ${TOOLCHAIN} -c rustfmt --profile minimal
rustup default ${TOOLCHAIN}
- run: cargo test
- run: cargo test --all-features -- --test-threads 1
env:
RUST_BACKTRACE: '1'

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
RUSTDOCFLAGS: ''
run: |
## Test
cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast
cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast -- --test-threads 1
- name: Test examples
shell: bash
env:
Expand All @@ -137,7 +137,7 @@ jobs:
RUSTDOCFLAGS: ''
run: |
## Test
cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --examples --no-fail-fast
cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --examples --no-fail-fast -- --test-threads 1
- name: Generate coverage data (via `grcov`)
id: coverage
shell: bash
Expand Down

0 comments on commit fbc49e5

Please sign in to comment.