fix: coverage workflow (#28)

This commit is contained in:
moebius
2025-01-14 13:59:48 +00:00
committed by GitHub
parent edc2cc5d10
commit cdb6afc9cc
3 changed files with 19 additions and 14 deletions

View File

@@ -1,13 +1,10 @@
name: Circuits
on:
push:
paths:
- "packages/circuits/**"
pull_request:
branches: [main, dev]
paths:
- "packages/circuits/**"
- ".github/workflows/**"
concurrency:
group: ${{github.workflow}}-${{github.ref}}

View File

@@ -1,13 +1,10 @@
name: Contracts
on:
push:
paths:
- "packages/contracts/**"
pull_request:
branches: [main, dev]
paths:
- "packages/contracts/**"
- ".github/workflows/**"
concurrency:
group: ${{github.workflow}}-${{github.ref}}
@@ -144,7 +141,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
# cache: "yarn"
- name: Install Yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
@@ -153,9 +153,18 @@ jobs:
shell: bash
run: yarn coverage
- name: Update package lists
run: |
sudo apt-get update
sudo apt-get install -y lcov
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
- name: Fix paths
run: |
sed -i "s|../../node_modules|$(realpath ../../node_modules)|g" lcov.info
- name: Filter directories
run: lcov --remove lcov.info 'test/*' 'script/*' --output-file lcovNew.info --rc lcov_branch_coverage=1 --rc derive_function_end_line=0 --ignore-errors unused
@@ -163,7 +172,9 @@ jobs:
id: new-coverage
uses: zgosalvez/github-actions-report-lcov@v4
with:
coverage-files: lcovNew.info
coverage-files: packages/contracts/lcovNew.info
working-directory: packages/contracts
base-path: ${{ github.workspace }}
- name: Retrieve previous coverage
uses: actions/download-artifact@v4

View File

@@ -1,13 +1,10 @@
name: SDK
on:
push:
paths:
- "packages/sdk/**"
pull_request:
branches: [main, dev]
paths:
- "packages/sdk/**"
- ".github/workflows/**"
concurrency:
group: ${{github.workflow}}-${{github.ref}}