🔨 improve the FactoryCreateAndInitAccount script #53
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: Coverage | |
env: | |
API_KEY_ALCHEMY: ${{ secrets.API_KEY_ALCHEMY }} | |
API_KEY_ETHERSCAN: ${{ secrets.API_KEY_ETHERSCAN }} | |
API_KEY_INFURA: ${{ secrets.API_KEY_INFURA }} | |
FOUNDRY_PROFILE: "ci" | |
MNEMONIC: ${{ secrets.MNEMONIC }} | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
coverage: | |
permissions: write-all | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: "actions/checkout@v3" | |
with: | |
submodules: recursive | |
token: ${{ secrets.SMOOTH_QDQD_PAT_RIVATE_REPOSITORY }} | |
- name: "Install Foundry" | |
uses: "foundry-rs/foundry-toolchain@v1" | |
- name: Setup lcov | |
uses: hrishikesh-kadam/setup-lcov@v1 | |
- name: "Generate the coverage report" | |
# contracts in the test/ and script/ directory are excluded fron the report | |
# the precompute internal version of the library is also excluded from the report as | |
# it is highly experimental and to meant to be used at all | |
run: "forge coverage --ir-minimum --report lcov && lcov --remove lcov.info \ | |
-o lcov.info 'test/*' 'script/*'" | |
- name: "Add coverage summary" | |
run: | | |
echo "## Coverage result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
- name: Report code coverage | |
uses: zgosalvez/github-actions-report-lcov@v3 | |
with: | |
coverage-files: lcov.info | |
# uncomment the following line to enforce a minimum coverage | |
# minimum-coverage: 80 | |
artifact-name: code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} |