Skip to content

Commit

Permalink
[GH Workflow] Migrate actions off of actions-rs (deprecated) to dtoln…
Browse files Browse the repository at this point in the history
…ay (#78)

### Summary

Update all of the workflow actions such that we are now using a
maintained rust toolchain setup and such that all deprecation warnings
cease to exist.


### Motivation

Cleaning up some bits that were starting to bit-rot.

### Test Plan

The test plan are the actions, which are passing on this PR.
  • Loading branch information
JohnMurray authored Jul 10, 2024
1 parent 705587b commit 242516b
Showing 1 changed file with 14 additions and 40 deletions.
54 changes: 14 additions & 40 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,72 +20,46 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace
- run: cargo check --workspace

test:
name: Test
runs-on: ubuntu-latest
needs: [check]
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
- run: cargo test --workspace

lints:
name: Lints
runs-on: ubuntu-latest
needs: [check]
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

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

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace
run: cargo clippy --workspace

spell_check:
name: Spell Check
Expand All @@ -98,7 +72,7 @@ jobs:
node-version: latest
- name: Install CSpell
run: npm install -g cspell
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Markdown Spellcheck
run: cspell --config .github/workflows/cspell.json "**/*.md"
- name: Rust Spellcheck
Expand Down

0 comments on commit 242516b

Please sign in to comment.