Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add reusable forge code coverage #72

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading