Skip to content

Add workflow to automatically create new node release #1027

Add workflow to automatically create new node release

Add workflow to automatically create new node release #1027

Workflow file for this run

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-04-18
components: rustfmt, clippy
target: wasm32-unknown-unknown
- name: Setup nightly Rust as default
run: rustup default nightly-2024-04-18
- 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-04-18
command: test
args: --release
- name: Clippy -- Main
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2024-04-18
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-04-18
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-04-18
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