Skip to content

Commit

Permalink
ci: replace outdated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
icedrocket authored and JP-Ellis committed May 25, 2023
1 parent ae6a107 commit ac7a5b6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 65 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/rust-audit-cron.yml
Expand Up @@ -6,7 +6,5 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- run: cargo audit
6 changes: 2 additions & 4 deletions .github/workflows/rust-audit.yml
Expand Up @@ -8,7 +8,5 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- run: cargo audit
79 changes: 22 additions & 57 deletions .github/workflows/rust.yml
Expand Up @@ -3,75 +3,40 @@ name: Rust
on: [push, pull_request]

jobs:
check:
fmt:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v1
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
override: true
components: rustfmt, clippy
- name: format
# switch to `action-rs/rustfmt-check` once that is available
uses: actions-rs/cargo@v1
with:
command: fmt
args: >-
--
--check
- name: clippy
uses: actions-rs/clippy-check@v1
components: rustfmt
- run: cargo fmt --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: clippy-${{ matrix.toolchain }}
args: >-
--bins
--examples
--tests
--benches
--
-W missing_docs
components: clippy
- run: cargo clippy --workspace

test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v1
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
- name: test
uses: actions-rs/cargo@v1
with:
command: test
- name: bench
uses: actions-rs/cargo@v1
with:
command: test
args: >-
--benches
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@v2
with:
toolchain: stable
override: true
- name: tarpaulin
uses: actions-rs/tarpaulin@v0.1
- name: upload
uses: codecov/codecov-action@v1
tool: cargo-tarpaulin
- run: cargo tarpaulin
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit ac7a5b6

Please sign in to comment.