Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Feb 9, 2024
1 parent 0711698 commit 3c4d36b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Audit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
48 changes: 13 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache target
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
Expand All @@ -24,29 +24,19 @@ jobs:
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
components: clippy, rustfmt
toolchain: ${{ matrix.rust }}
override: true

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
run: cargo clippy --all-features -- -W clippy::all -D warnings

- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Doc Generation
uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features
run: cargo doc --bins --examples --all-features --no-deps

build:
runs-on: ${{ matrix.os }}
Expand All @@ -57,7 +47,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache target
uses: actions/cache@v2
Expand All @@ -69,23 +59,16 @@ jobs:
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
components: clippy
toolchain: ${{ matrix.rust }}
override: true

- name: Build debug binary
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build

- name: Build release binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release
run: cargo build --release

test:
runs-on: ${{ matrix.os }}
Expand All @@ -96,7 +79,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache target
uses: actions/cache@v2
Expand All @@ -108,15 +91,10 @@ jobs:
key: ${{ matrix.os }}-cargo--${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
components: clippy
toolchain: ${{ matrix.rust }}
override: true

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features -- --test-threads=1
run: cargo test --all-features -- --test-threads=1

0 comments on commit 3c4d36b

Please sign in to comment.