Skip to content

Commit

Permalink
Fix lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhuiluo authored and gnarlycow committed Jan 6, 2024
1 parent a992092 commit 3848a13
Showing 1 changed file with 44 additions and 9 deletions.
53 changes: 44 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Rust Tests
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
Expand Down Expand Up @@ -54,16 +54,51 @@ jobs:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy

- name: Build
run: cargo build --verbose
components: clippy

- name: Check lint
run: cargo clippy -- -D warnings

- name: Check formatting
run: cargo fmt -- --check
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: "yarn.lock"

- name: Install dependencies 📦
run: yarn install --frozen-lockfile

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Generate contract Rust bindings
run: forge bind -b src/bindings/ --module --overwrite

- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Build
run: cargo build

- name: Run tests
run: cargo test --verbose
run: cargo test

0 comments on commit 3848a13

Please sign in to comment.