-
Notifications
You must be signed in to change notification settings - Fork 176
50 lines (41 loc) · 1.32 KB
/
Copy pathbuild-test.yml
File metadata and controls
50 lines (41 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 -r --sequential run 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