Skip to content

Commit

Permalink
Remove use of deprecated actions-rs/cargo GH action (#7375)
Browse files Browse the repository at this point in the history
Our CI actions have a lot of warnings like this:

>  nu-fmt-clippy (ubuntu-20.04, stable)
> Node.js 12 actions are deprecated. For more information see:
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
Please update the following actions to use Node.js 16:
actions-rs/[email protected]

[It looks like `actions-rs/cargo` is
abandoned](actions-rs/toolchain#216). But the
good news is we don't actually need it, we can just run `cargo`
subcommands without a special action because we've already installed
`cargo` with `actions-rust-lang/setup-rust-toolchain`.
  • Loading branch information
rgwood committed Dec 7, 2022
1 parent 3395bea commit 5114dfc
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@ jobs:
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/[email protected]

- name: Rustfmt
uses: actions-rs/[email protected]
with:
command: fmt
args: --all -- --check
- name: cargo fmt
run: cargo fmt --all -- --check

- name: Clippy
uses: actions-rs/[email protected]
with:
command: clippy
args: --workspace --exclude nu_plugin_* -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
run: cargo clippy --workspace --exclude nu_plugin_* -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect

nu-tests:
env:
Expand Down Expand Up @@ -72,10 +66,7 @@ jobs:
uses: actions-rust-lang/[email protected]

- name: Tests
uses: actions-rs/[email protected]
with:
command: test
args: --workspace --profile ci --exclude nu_plugin_* ${{ matrix.flags }}
run: cargo test --workspace --profile ci --exclude nu_plugin_* ${{ matrix.flags }}

python-virtualenv:
env:
Expand All @@ -99,10 +90,7 @@ jobs:
uses: actions-rust-lang/[email protected]

- name: Install Nushell
uses: actions-rs/[email protected]
with:
command: install
args: --locked --path=. --profile ci --no-default-features
run: cargo install --locked --path=. --profile ci --no-default-features

- name: Setup Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -141,13 +129,7 @@ jobs:
uses: actions-rust-lang/[email protected]

- name: Clippy
uses: actions-rs/[email protected]
with:
command: clippy
args: --package nu_plugin_* ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
run: cargo clippy --package nu_plugin_* ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect

- name: Tests
uses: actions-rs/[email protected]
with:
command: test
args: --profile ci --package nu_plugin_*
run: cargo test --profile ci --package nu_plugin_*

0 comments on commit 5114dfc

Please sign in to comment.