Horizon: bug fixes #29
This file contains hidden or 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: Build and Test | |
env: | |
CI: true | |
STUDIO_API_KEY: ${{ secrets.STUDIO_API_KEY }} | |
on: | |
pull_request: | |
branches: '*' | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up environment | |
uses: ./.github/actions/setup | |
- name: Build all packages | |
run: pnpm build | |
- name: Test all packages | |
run: pnpm -r --sequential run test | |
- name: Test with coverage | |
run: pnpm -r --sequential run test:coverage | |
- name: Find coverage files | |
id: coverage_files | |
run: | | |
# Find all coverage-final.json files | |
COVERAGE_FILES=$(find ./packages -name "coverage-final.json" -path "*/reports/coverage/*" | tr '\n' ',' | sed 's/,$//') | |
echo "files=$COVERAGE_FILES" >> $GITHUB_OUTPUT | |
echo "Found coverage files: $COVERAGE_FILES" | |
- name: Upload coverage reports | |
if: steps.coverage_files.outputs.files != '' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{ steps.coverage_files.outputs.files }} | |
flags: unittests | |
name: graphprotocol-contracts | |
fail_ci_if_error: true |