2021-06-04 12:30:43 +02:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-03-06 21:11:41 +01:00
|
|
|
- master
|
2023-05-02 14:02:25 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
FOUNDRY_PROFILE: ci
|
|
|
|
|
2021-06-04 12:30:43 +02:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-03-06 21:11:41 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-06-04 12:30:43 +02:00
|
|
|
- name: Use Node.js
|
2023-03-06 21:11:41 +01:00
|
|
|
uses: actions/setup-node@v3
|
2021-06-04 12:30:43 +02:00
|
|
|
with:
|
2023-03-21 15:05:32 +01:00
|
|
|
node-version: 18.15.x
|
2023-03-06 21:11:41 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
|
|
run: yarn lint
|
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
|
|
|
- name: Test
|
|
|
|
run: yarn test
|
|
|
|
|
2023-05-02 14:02:25 +02:00
|
|
|
test_foundry:
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
|
|
|
|
name: Foundry tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Install Foundry
|
|
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
|
|
with:
|
|
|
|
version: nightly
|
|
|
|
|
|
|
|
- name: Run Forge build
|
|
|
|
run: |
|
|
|
|
cd packages/contracts
|
|
|
|
forge --version
|
|
|
|
forge build --sizes
|
|
|
|
id: build
|
|
|
|
|
|
|
|
- name: Run Forge tests
|
|
|
|
run: |
|
|
|
|
cd packages/contracts
|
|
|
|
forge test -vvv
|
|
|
|
id: test
|