Skip to content

Commit

Permalink
ci: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Jul 16, 2024
1 parent fcd3d96 commit ee84bfc
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- id: setup
name: Setup Toolchain
Expand All @@ -46,7 +46,7 @@ jobs:

- id: upload
name: Upload Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.coverage.outputs.report }}
Expand Down
57 changes: 31 additions & 26 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- id: setup
name: Setup Toolchain
Expand All @@ -39,71 +39,76 @@ jobs:

strategy:
matrix:
toolchain: [stable, nightly]
toolchain: [nightly, stable]

steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
toolchain: ${{ matrix.toolchain }}
components: clippy

- id: cache
name: Enable Workflow Cache
uses: Swatinem/rust-cache@v2

- id: tools
name: Install Tools
uses: taiki-e/install-action@v2
with:
tool: cargo-machete

- id: check
name: Run Build Checks
run: cargo check --workspace --all-targets --all-features
run: cargo check --tests --benches --examples --workspace --all-targets --all-features

- id: lint
name: Run Lint Checks
run: cargo clippy --workspace --all-targets --all-features -- -D clippy::correctness -D clippy::suspicious
run: cargo clippy --tests --benches --examples --workspace --all-targets --all-features -- -D clippy::correctness -D clippy::suspicious -D clippy::complexity -D clippy::perf -D clippy::style -D clippy::pedantic

- id: doc
name: Run Documentation Checks
run: cargo test --doc
- id: docs
name: Lint Documentation
env:
RUSTDOCFLAGS: "-D warnings"
run: cargo doc --no-deps --bins --examples --workspace --all-features

- id: deps
name: Check Unused Dependencies
run: cargo machete --with-metadata

internal:
name: Units and Integrations
unit:
name: Units
runs-on: ubuntu-latest
needs: check

strategy:
matrix:
toolchain: [stable, nightly]
toolchain: [nightly, stable]

steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: llvm-tools-preview

- id: cache
name: Enable Job Cache
uses: Swatinem/rust-cache@v2

- id: test
name: Run Code Tests
run: cargo test --workspace --all-targets --all-features

- id: tools
name: Install Coverage Tools
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov, cargo-nextest
- id: test-docs
name: Run Documentation Tests
run: cargo test --doc

- id: coverage
name: Generate Coverage Report
run: cargo llvm-cov nextest --workspace --all-targets --all-features
- id: test
name: Run Unit Tests
run: cargo test --tests --benches --examples --workspace --all-targets --all-features

0 comments on commit ee84bfc

Please sign in to comment.