Update governor with jobId and simplify voting mechanism #214
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: forge-tests | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
branches: [ '**' ] | |
paths-ignore: | |
- 'README.md' | |
workflow_dispatch: | |
jobs: | |
forge-tests: | |
runs-on: ubuntu-latest | |
if: github.ref != 'refs/heads/main' && github.event.pull_request.draft == false | |
strategy: | |
matrix: | |
node-version: [18.15.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Fetch submodules | |
run: git submodule update --init --recursive | |
- name: Install dependencies | |
run: yarn install --production=false | |
- name: "Install Foundry" | |
uses: "foundry-rs/foundry-toolchain@v1" | |
- name: "Show the Foundry config" | |
run: "forge config" | |
- name: "Generate a fuzz seed that changes weekly to avoid burning through RPC allowance" | |
run: > | |
echo "FOUNDRY_FUZZ_SEED=$( | |
echo $(($EPOCHSECONDS - $EPOCHSECONDS % 604800)) | |
)" >> $GITHUB_ENV | |
- name: clean | |
run: yarn clean | |
- name: "Run the tests" | |
run: | | |
cd ./packages/contracts | |
forge build | |
forge test | |
- name: "Add test summary" | |
run: | | |
echo "## Tests result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |