Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xavikh committed Feb 10, 2025
1 parent ec18ada commit de71bbc
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 19 deletions.
78 changes: 60 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,82 @@
name: CI
name: Tests

on:
push:
branches:
- 'main'
- 'develop'
- 'deploy/**'
pull_request:
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci

jobs:
check:
test-upgrades:
strategy:
fail-fast: true
name: Test upgrades
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: oven-sh/setup-bun@v2

- name: foundry-toolchain
uses: foundry-rs/[email protected]

name: Foundry project
- name: Show Forge version
run: forge --version

- name: Build
run: bun run build-all

- name: Run tests
run: bun run test-upgrades
test-fork:
strategy:
fail-fast: true
name: Test fork
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: oven-sh/setup-bun@v2

- name: foundry-toolchain
uses: foundry-rs/[email protected]

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Show Forge version
run: forge --version

- name: Build
run: bun run build

- name: Run tests
run: bun run test-fork
test-unit:
strategy:
fail-fast: true
name: Test unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
version: nightly
submodules: recursive
- uses: oven-sh/setup-bun@v2

- name: foundry-toolchain
uses: foundry-rs/[email protected]

- name: Show Forge version
run: |
forge --version
- name: Run Forge build
run: |
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test --no-match-path "test/fork/**/*.sol" -vvv
id: test
run: forge --version

- name: Build
run: bun run build

- name: Run tests
run: bun run test-unit

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"build": "forge build",
"build-clean": "forge build --force",
"build-refs": "bash script/build-reference-builds.sh",
"build-all": "bun run build-refs && bun run build-clean"
"build-all": "bun run build-refs && bun run build-clean",
"test-unit": "forge test --no-match-path \"{test/fork/*.sol,test/upgrades/*.sol}\" -vvv",
"test-fork": "forge test --match-path \"test/fork/**/*.sol\" -vvv",
"test-upgrades": "forge test --match-path \"test/upgrades/**/*.sol\" -vvv",
"test": "forge test -vvv"
}
}

0 comments on commit de71bbc

Please sign in to comment.