Skip to content

Commit

Permalink
Feat/add reusable forge code coverage (storyprotocol#72)
Browse files Browse the repository at this point in the history
* Refactor Governance into AccessManager (storyprotocol#43)

* refactor Governance into AccessManager
* remove view method in script

* [feat] add reusable forge code coverage workflow

---------

Co-authored-by: Ramarti <[email protected]>
  • Loading branch information
2 people authored and Spablob committed Apr 12, 2024
1 parent df15b09 commit e88c07c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/foundry_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,16 @@ on:

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"
# Add a timestamp to the build
Timestamp:
uses: storyprotocol/gha-workflows/.github/workflows/reusable-timestamp.yml@main

foundry-test:
strategy:
fail-fast: true
name: Foundry Unit Test
runs-on: ubuntu-latest
needs: print_timestamp
needs: [Timestamp]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down Expand Up @@ -60,3 +52,12 @@ jobs:

- name: Run solhint
run: npx solhint contracts/**/*.sol

Coverage:
needs: [foundry-test]
uses: storyprotocol/gha-workflows/.github/workflows/reusable-forge-code-coverage.yml@main
# FOR LOCAL TESTING ONLY
# uses: ./../gha-workflows/.github/workflows/reusable-forge-code-coverage.yml
with:
exclude_paths: 'test/*, script/*'
branch_coverage: true

0 comments on commit e88c07c

Please sign in to comment.