Amend node version up (#502) #1030
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Code | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test-code: | |
runs-on: ubuntu-latest | |
env: | |
# Make sure CI fails on all warnings, including Clippy lints | |
RUSTFLAGS: "-Dwarnings" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/shared | |
- name: Remove rust-toolchain.toml | |
# To make sure that the nightly version will be used all throughout | |
run: | | |
rm /home/runner/work/pendulum/pendulum/rust-toolchain.toml | |
- name: Setup nightly Rust toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly-2024-05-30 | |
components: rustfmt, clippy | |
target: wasm32-unknown-unknown | |
- name: Setup nightly Rust as default | |
run: rustup default nightly-2024-05-30 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
toolchain: nightly-2024-05-30 | |
command: test | |
args: --release | |
- name: Clippy -- Main | |
uses: actions-rs/cargo@v1 | |
with: | |
toolchain: nightly-2024-05-30 | |
command: clippy | |
args: --release --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references | |
- name: Clippy -- All Targets (except integration) | |
uses: actions-rs/cargo@v1 | |
with: | |
toolchain: nightly-2024-05-30 | |
command: clippy | |
# We are a bit more forgiving when it comes to the code in tests and only check for correctness | |
args: --workspace --release --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references | |
- name: Clippy -- Integration | |
uses: actions-rs/cargo@v1 | |
with: | |
toolchain: nightly-2024-05-30 | |
command: clippy | |
# We are a bit more forgiving when it comes to the code in tests and only check for correctness | |
args: --package runtime-integration-tests --release --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references | |