Skip to content

Revamp tooling

Revamp tooling #439

Workflow file for this run

---
name: Tests and Checks
on:
workflow_dispatch:
pull_request:
env:
FOUNDRY_PROFILE: ci
FORGE_REV: d58ab7f
JUST_TAG: 1.24.0
jobs:
security:
uses: lidofinance/linters/.github/workflows/security.yml@master
actions:
uses: lidofinance/linters/.github/workflows/actions.yml@master
linters:
name: Linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/cache@v3
with:
path: ~/.cargo/bin/
key: forge-${{ env.FORGE_REV }}-just-${{ env.JUST_TAG }}-${{ runner.os }}-${{ runner.arch }}
- name: Install just
run: which just || cargo install "just@$JUST_TAG"
- name: Install node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: yarn
cache-dependency-path: "**/yarn.lock"
- name: Install dependencies
run: just deps
- name: Linters check
run: just lint
foundry:
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/cache@v3
with:
path: ~/.cargo/bin/
key: forge-${{ env.FORGE_REV }}-just-${{ env.JUST_TAG }}-${{ runner.os }}-${{ runner.arch }}
- name: Install just
run: which just || cargo install "just@$JUST_TAG"
- name: Install node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: yarn
cache-dependency-path: "**/yarn.lock"
- name: Install forge
run: |
which forge ||\
cargo install --git https://github.com/foundry-rs/foundry --rev "$FORGE_REV" --profile local forge
- name: Install dependencies
run: just deps
- name: Build
run: just build --sizes
- name: Run tests
run: just test
env:
RPC_URL: ${{ secrets.RPC_URL }}