Skip to content

Commit

Permalink
ci: use actions to install nextest and cargo-llvm-cov (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCroxx committed Mar 28, 2022
1 parent 8142191 commit 55cb955
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
11 changes: 5 additions & 6 deletions .github/template/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
env:
RUST_TOOLCHAIN: nightly-2022-03-09
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20220324
CACHE_KEY_SUFFIX: 20220328

jobs:
misc-check:
Expand Down Expand Up @@ -71,11 +71,10 @@ jobs:
run: |
# If new CI checks are added, the one with `--locked` must be run first.
cargo clippy --all-targets --locked -- -D warnings
- name: Install required tools for test with coverage
if: steps.cache.outputs.cache-hit != 'true'
run: |
cargo install cargo-llvm-cov
cargo install cargo-nextest
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@cargo-llvm-cov
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@nextest
- name: Run rust test with coverage
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
RUST_TOOLCHAIN: nightly-2022-03-09
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20220324
CACHE_KEY_SUFFIX: 20220328
jobs:
misc-check:
name: misc check
Expand Down Expand Up @@ -77,11 +77,10 @@ jobs:
run: |
# If new CI checks are added, the one with `--locked` must be run first.
cargo clippy --all-targets --locked -- -D warnings
- name: Install required tools for test with coverage
if: steps.cache.outputs.cache-hit != 'true'
run: |
cargo install cargo-llvm-cov
cargo install cargo-nextest
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@cargo-llvm-cov
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@nextest
- name: Run rust test with coverage
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
RUST_TOOLCHAIN: nightly-2022-03-09
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20220324
CACHE_KEY_SUFFIX: 20220328
jobs:
misc-check:
name: misc check
Expand Down Expand Up @@ -76,11 +76,10 @@ jobs:
run: |
# If new CI checks are added, the one with `--locked` must be run first.
cargo clippy --all-targets --locked -- -D warnings
- name: Install required tools for test with coverage
if: steps.cache.outputs.cache-hit != 'true'
run: |
cargo install cargo-llvm-cov
cargo install cargo-nextest
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@cargo-llvm-cov
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@nextest
- name: Run rust test with coverage
run: |
cargo llvm-cov nextest --lcov --output-path lcov.info
Expand Down

0 comments on commit 55cb955

Please sign in to comment.