Skip to content

Commit

Permalink
run the checks in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
SVilgelm committed Mar 18, 2024
1 parent 2f1d07d commit a027b6f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[alias]
install-tools = "install [email protected] [email protected] [email protected] [email protected] [email protected]"
install-license = "install [email protected]"
install-test-tools = "install [email protected] [email protected]"
install-dependency-check-tools = "install [email protected] [email protected]"
update-tools = "install cargo-deny cargo-license cargo-llvm-cov cargo-machete cargo-nextest"
43 changes: 34 additions & 9 deletions .github/workflows/rust.yaml → .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,29 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
Build:
runs-on: ubuntu-latest
steps:
- run: cargo build --all-features --verbose
Format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo fmt --all --check --verbose
Clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy --all-features
Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-all-crates: true
- name: Build
run: cargo build --all-features --verbose
- name: Format
run: cargo fmt --all --check --verbose
- name: Clippy
run: cargo clippy
- name: Install tools
run: cargo install-tools
- run: cargo install-test-tools
- name: Run tests
id: tests
run: cargo llvm-cov nextest --all-features --all-targets --no-fail-fast
Expand All @@ -46,10 +53,28 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage/*.lcov
Deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-all-crates: true
- run: cargo install-dependency-check-tools
- name: Machete
run: cargo machete
- name: Deny
run: cargo deny check all
Publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-targets: false
cache-all-crates: true
- run: cargo install-license
- name: Dry run publish
run: |
cargo license --all-features --avoid-dev-deps --json > dependencies-license.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

jobs:
build:
uses: ./.github/workflows/rust.yaml
uses: ./.github/workflows/checks.yaml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
publish:
Expand Down

0 comments on commit a027b6f

Please sign in to comment.