Skip to content

Commit

Permalink
ci: split test and coverage, deps (#107)
Browse files Browse the repository at this point in the history
Splits the test and coverage steps into seperate jobs to parallelize
them for faster workflow executions. Also upgraded the versions of all
used actions.
  • Loading branch information
cococonscious authored Nov 13, 2024
1 parent f291e03 commit a347ea4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/call-build-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
os: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2
with:
ref: ${{ inputs.tag_ref }}
- uses: actions/cache@v4.0.2
- uses: actions/cache@v4.1.2
with:
path: |
~/.cargo/bin/
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/push-pr-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:

jobs:
test:
name: cargo test, tarpaulin & codecov
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/cache@v4.0.2
- uses: actions/checkout@v4.2.2
- uses: actions/cache@v4.1.2
with:
path: |
~/.cargo/bin/
Expand All @@ -26,18 +26,32 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-features

coverage:
name: cargo tarpaulin & codecov
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install cargo-tarpaulin
- run: cargo tarpaulin --out Xml
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}

lints:
name: cargo clippy & fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/cache@v4.0.2
- uses: actions/checkout@v4.2.2
- uses: actions/cache@v4.1.2
with:
path: |
~/.cargo/bin/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
releases: ${{ steps.release-plz.outputs.releases }}
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: actions/cache@v4.0.2
- uses: actions/cache@v4.2.2
with:
path: |
~/.cargo/bin/
Expand Down

0 comments on commit a347ea4

Please sign in to comment.