Skip to content

Commit

Permalink
CI: Use --all-targets and --workspace where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed Jan 4, 2021
1 parent 99e451f commit 9a6c3bf
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ jobs:
name: clippy "No Default Features" (${{ matrix.os }} / ${{ matrix.rust }})
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --no-default-features -- -D warnings
args: --workspace --no-default-features --all-targets -- -D warnings
name: clippy "No Default Features" (${{ matrix.os }} / ${{ matrix.rust }})
- uses: actions-rs/clippy-check@v1
name: clippy "Default" (${{ matrix.os }} / ${{ matrix.rust }})
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace -- -D warnings
args: --workspace --all-targets -- -D warnings
name: clippy "Default" (${{ matrix.os }} / ${{ matrix.rust }})
- uses: actions-rs/clippy-check@v1
name: clippy "All Features" (${{ matrix.os }} / ${{ matrix.rust }})
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features -- -D warnings
args: --workspace --all-features --all-targets -- -D warnings
name: clippy "All Features" (${{ matrix.os }} / ${{ matrix.rust }})

rustfmt:
Expand Down Expand Up @@ -91,34 +91,35 @@ jobs:
if: matrix.rust != 'nightly'
with:
command: build
args: --all --all-features
args: --workspace --all-features --all-targets
- uses: actions-rs/cargo@v1
name: Build (${{ matrix.os }} / ${{ matrix.rust }})
if: matrix.rust == 'nightly'
with:
command: build
# https://github.com/rust-lang/cargo/issues/8088 for unstable-options
args: --all --all-features -Zunstable-options -Zfeatures=dev_dep,host_dep
args: --workspace --all-features --all-targets -Zunstable-options -Zfeatures=dev_dep,host_dep
- uses: actions-rs/cargo@v1
name: Test "No Default Features" (${{ matrix.os }} / ${{ matrix.rust }})
with:
command: test
args: --all --no-default-features
args: --workspace --no-default-features --all-targets
- uses: actions-rs/cargo@v1
name: Test "Default" (${{ matrix.os }} / ${{ matrix.rust }})
with:
command: test
args: --all
args: --workspace --all-targets
- uses: actions-rs/cargo@v1
name: Test "All Features" (${{ matrix.os }} / ${{ matrix.rust }})
with:
command: test
args: --all --all-features
args: --workspace --all-features --all-targets

- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
with:
# tarpaulin already runs with --all-targets
args: "--workspace --all-features -- --test-threads 1"
- name: Upload to codecov.io
uses: codecov/codecov-action@v1.1.1
Expand Down

0 comments on commit 9a6c3bf

Please sign in to comment.