Skip to content

Commit

Permalink
chore: Update GitHub workflows configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgonzalezra committed May 27, 2024
1 parent 859686c commit 65fd774
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 181 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# name: Forge Coverage
name: Forge Coverage

# on:
# push:
# branches:
# - main
# pull_request:
on:
push:
branches:
- main
pull_request:

# permissions: write-all
permissions: write-all

# jobs:
# check:
# name: Code Coverage
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
jobs:
check:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

# - name: Install lcov
# uses: hrishikesh-kadam/setup-lcov@v1
- name: Install lcov
uses: hrishikesh-kadam/setup-lcov@v1

# - name: Run coverage
# env:
# MNEMONIC: ${{ secrets.MNEMONIC_FOR_TESTS }}
# MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
# run: make coverage profile=ci
# id: coverage
- name: Run coverage
env:
MNEMONIC: ${{ secrets.MNEMONIC_FOR_TESTS }}
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
run: make coverage profile=ci
id: coverage

# - name: Report code coverage
# uses: zgosalvez/github-actions-report-lcov@v3
# with:
# coverage-files: lcov.info
# artifact-name: code-coverage-report
# minimum-coverage: 95
# github-token: ${{ secrets.GITHUB_TOKEN }}
# update-comment: true
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v3
with:
coverage-files: lcov.info
artifact-name: code-coverage-report
minimum-coverage: 95
github-token: ${{ secrets.GITHUB_TOKEN }}
update-comment: true
70 changes: 35 additions & 35 deletions .github/workflows/test-fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# name: Forge Fuzz Tests
#
# on:
# push:
# branches:
# - main
# pull_request:
#
# permissions: write-all
#
# jobs:
# check:
# name: Fuzz Tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
#
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
#
# - name: Run Forge build
# run: |
# forge --version
# make sizes
# id: build
#
# - name: Run Forge fuzz tests
# run: make fuzz profile=ci
# env:
# # make fuzzing semi-deterministic to avoid noisy gas cost estimation
# # due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
# FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
# MNEMONIC: ${{ secrets.MNEMONIC_FOR_TESTS }}
name: Forge Fuzz Tests

on:
push:
branches:
- main
pull_request:

permissions: write-all

jobs:
check:
name: Fuzz Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

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

- name: Run Forge fuzz tests
run: make fuzz profile=ci
env:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
MNEMONIC: ${{ secrets.MNEMONIC_FOR_TESTS }}
96 changes: 48 additions & 48 deletions .github/workflows/test-gas.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# name: Forge Tests Gas Report

# on:
# push:
# branches:
# - main
# pull_request:

# permissions: write-all

# jobs:
# check:
# name: Gas report
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive

# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1

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

# - name: Run Forge tests with gas report
# run: make gas-report profile=ci
# env:
# # make fuzzing semi-deterministic to avoid noisy gas cost estimation
# # due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
# FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
# MNEMONIC: ${{ secrets.MNEMONIC_FOR_TESTS }}
# MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}

# - name: Compare gas reports
# uses: Rubilmax/foundry-gas-diff@v3.16
# id: gas_diff

# - name: Add gas diff to sticky comment
# if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
# uses: marocchino/sticky-pull-request-comment@v2
# with:
# # delete the comment in case changes no longer impact gas costs
# delete: ${{ !steps.gas_diff.outputs.markdown }}
# message: ${{ steps.gas_diff.outputs.markdown }}
name: Forge Tests Gas Report

on:
push:
branches:
- main
pull_request:

permissions: write-all

jobs:
check:
name: Gas report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

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

- name: Run Forge tests with gas report
run: make gas-report profile=ci
env:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
MNEMONIC: ${{ secrets.MNEMONIC_FOR_TESTS }}
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}

- name: Compare gas reports
uses: Rubilmax/foundry-gas-diff@v3.16
id: gas_diff

- name: Add gas diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
# delete the comment in case changes no longer impact gas costs
delete: ${{ !steps.gas_diff.outputs.markdown }}
message: ${{ steps.gas_diff.outputs.markdown }}
30 changes: 0 additions & 30 deletions .github/workflows/test-integration.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/test-invariant.yml

This file was deleted.

0 comments on commit 65fd774

Please sign in to comment.