Skip to content

Commit

Permalink
feat(ci): add dtolnay rust-toolchin and cargo hack
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleygwilliams committed Apr 6, 2023
1 parent 7f2fefb commit 2be08cf
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,31 @@ env:
RUSTFLAGS: -Dwarnings

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Run cargo check
run: |
cargo check --all --tests
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run cargo clippy
run: |
cargo clippy --tests --examples
Expand All @@ -31,18 +45,29 @@ jobs:
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v2
- name: Run cargo clippy
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Run rustdoc
run: |
cargo doc --no-deps
cargo-hack:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- name: Run cargo hack check powerset
run: |
cargo hack check --feature-powerset --no-dev-deps
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
feature-flags: ["", "--no-default-features", "--all-features", "--features remote"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Run cargo test
run: |
cargo test ${{ matrix.feature-flags }}

0 comments on commit 2be08cf

Please sign in to comment.