Skip to content

Commit

Permalink
Merge pull request #879 from mulkieran/cargo-tarpaulin
Browse files Browse the repository at this point in the history
Makefile tidies
  • Loading branch information
mulkieran authored Sep 18, 2023
2 parents 3b93cf4 + d1b641a commit 3374173
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
24 changes: 3 additions & 21 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,12 @@ jobs:
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-audit
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
run: ${{ matrix.task }}

tarpaulin:
strategy:
matrix:
include:
- toolchain: 1.72.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: ${{ matrix.toolchain }}
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Set toolchain override with sudo
run: sudo /home/runner/.cargo/bin/rustup override set ${{ matrix.toolchain }} # yamllint disable rule:line-length
- name: Run all tests on ${{ matrix.toolchain }} toolchain
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH make -f Makefile tarpaulin # yamllint disable rule:line-length

checks-with-ci-repo:
runs-on: ubuntu-20.04
container:
Expand Down
22 changes: 2 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,8 @@ DENY = -D warnings -D future-incompatible -D unused -D rust_2018_idioms -D nonst

CLIPPY_DENY = -D clippy::all -D clippy::cargo -A clippy::multiple-crate-versions

${HOME}/.cargo/bin/cargo-tree:
cargo install cargo-tree

${HOME}/.cargo/bin/cargo-audit:
cargo install cargo-audit

${HOME}/.cargo/bin/cargo-tarpaulin:
cargo install cargo-tarpaulin

tree: ${HOME}/.cargo/bin/cargo-tree
PATH=${HOME}/.cargo/bin:${PATH} cargo tree

audit: ${HOME}/.cargo/bin/cargo-audit
PATH=${HOME}/.cargo/bin:${PATH} cargo audit -D warnings

tarpaulin: ${HOME}/.cargo/bin/cargo-tarpaulin
PATH=${HOME}/.cargo/bin:${PATH} \
RUST_BACKTRACE=1 \
cargo tarpaulin -v -- --test-threads=1
audit:
cargo audit -D warnings

SET_LOWER_BOUNDS ?=
test-set-lower-bounds:
Expand Down Expand Up @@ -98,6 +81,5 @@ yamllint:
test
test-compare-fedora-versions
test-set-lower-bounds
tree
verify-dependency-bounds
yamllint

0 comments on commit 3374173

Please sign in to comment.