Refactored to upgradeable contracts (2/2) (Dispute, Royalties) #29
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: Foundry CI | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# Add job timestamp | |
print_timestamp: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate timestamp | |
run: | | |
echo "TIMESTAMP=$(TZ='America/Los_Angeles' date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | |
- name: Print timestamp | |
run: | | |
echo "Execution time (Pacific Time Zone) $TIMESTAMP" | |
foundry-test: | |
strategy: | |
fail-fast: true | |
name: Foundry Unit Test | |
runs-on: ubuntu-latest | |
needs: print_timestamp | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Run install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install # will run `yarn install` command | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
# first, build contracts excluding the tests and scripts. Check contract sizes in this step. | |
# then, build contracts including the tests and scripts. Don't check contract sizes. | |
- name: Run Forge build | |
run: | | |
forge --version | |
forge build --force --sizes --skip test --skip script | |
- name: Run Forge tests | |
run: | | |
forge test -vvv --fork-url https://gateway.tenderly.co/public/sepolia --fork-block-number 5196000 | |
id: forge-test | |
- name: Run solhint | |
run: npx solhint contracts/**/*.sol |