fix: hacken auditing finding F-2024-1979 #435
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'contracts/**' | |
- 'tests/**' | |
- 'Cargo.*' | |
- makefile | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup Rust environment | |
- name: Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.66.1 # stable | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
# Set up Node environment | |
- name: Setup Node | |
uses: actions/setup-node@v3.1.1 | |
with: | |
node-version: 20.12.0 | |
cache: npm | |
- name: Install Dependencies | |
run: npm install | |
# Run tests | |
- name: Run tests | |
run: make test | |
lint: | |
name: clippy and fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup Rust environment | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.66.1 # stable | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v1 | |
# Run lint | |
- name: Test Format | |
run: cargo fmt -- --check | |
- name: Lint with clippy | |
run: cargo clippy --tests -- -D clippy::all |