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

Fix codecov source files #806

Merged
merged 17 commits into from
May 12, 2022
Merged
37 changes: 13 additions & 24 deletions .github/workflows/ci.canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'packages/**'
# - '**.md' commented-out because README updates should go to the packages
- '.github/workflows/ci.canary.yml'
- 'codecov.yml'

jobs:
essential-build-and-test:
Expand All @@ -34,7 +35,6 @@ jobs:
echo github.ref: ${{ github.ref }}
echo github.head_ref: ${{ github.head_ref }}
echo github.base_ref: ${{ github.base_ref }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -110,8 +110,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
path: protocol-monorepo

- name: Use Node.js 16.x
uses: actions/setup-node@v1
Expand All @@ -130,7 +128,7 @@ jobs:
with:
name: ethereum-contracts-coverage
path: |
protocol-monorepo/packages/ethereum-contracts/coverage/
packages/ethereum-contracts/coverage/

js-sdk-coverage:
name: Run coverage test of js-sdk on dev branch
Expand All @@ -141,16 +139,13 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
path: protocol-monorepo

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Run coverage test
working-directory: protocol-monorepo
run: |
yarn install --frozen-lockfile
yarn build
Expand All @@ -161,7 +156,7 @@ jobs:
with:
name: js-sdk-coverage
path: |
protocol-monorepo/packages/js-sdk/coverage/
packages/js-sdk/coverage/

sdk-core-coverage:
name: Run coverage test of sdk-core on dev branch
Expand All @@ -172,16 +167,13 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
path: protocol-monorepo

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Run coverage test
working-directory: protocol-monorepo
run: |
yarn install --frozen-lockfile
yarn build
Expand All @@ -192,31 +184,28 @@ jobs:
with:
name: sdk-core-coverage
path: |
protocol-monorepo/packages/sdk-core/coverage/
packages/sdk-core/coverage/

publish-coverage-reports:
name: Publish coverage reports

needs: [ethereum-contracts-coverage, js-sdk-coverage, sdk-core-coverage]

runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
with:
# NOTE: all coverage report job should checkout the code to the same path,
# otherwise reports wouldn't match the code here.
path: protocol-monorepo

- name: Download ethereum-contracts-coverage
uses: actions/download-artifact@v3
with:
name: ethereum-contracts-coverage
path: protocol-monorepo/packages/ethereum-contracts/coverage
path: packages/ethereum-contracts/coverage
- name: Upload ethereum-contracts-coverage to codecov
uses: codecov/codecov-action@v2
with:
files: protocol-monorepo/packages/ethereum-contracts/coverage/lcov.info
files: packages/ethereum-contracts/coverage/lcov.info
name: ethereum-contracts-coverage
flags: ethereum-contracts
fail_ci_if_error: true
Expand All @@ -225,11 +214,11 @@ jobs:
uses: actions/download-artifact@v3
with:
name: js-sdk-coverage
path: protocol-monorepo/packages/js-sdk/coverage
path: packages/js-sdk/coverage
- name: Upload js-sdk-coverage to codecov
uses: codecov/codecov-action@v2
with:
files: protocol-monorepo/packages/js-sdk/coverage/lcov.info
files: packages/js-sdk/coverage/lcov.info
name: js-sdk-coverage
flags: js-sdk
fail_ci_if_error: true
Expand All @@ -238,11 +227,11 @@ jobs:
uses: actions/download-artifact@v3
with:
name: sdk-core-coverage
path: protocol-monorepo/packages/sdk-core/coverage
path: packages/sdk-core/coverage
- name: Upload sdk-core-coverage to codecov
uses: codecov/codecov-action@v2
with:
files: protocol-monorepo/packages/sdk-core/coverage/lcov.info
files: packages/sdk-core/coverage/lcov.info
name: sdk-core-coverage
flags: sdk-core
fail_ci_if_error: true
Expand Down Expand Up @@ -360,4 +349,4 @@ jobs:
env:
RELEASE_VERSION: master
ETH_GOERLI_MNEMONIC: ${{ secrets.BUILD_AGENT_MNEMONIC }}
ETH_GOERLI_PROVIDER_URL: ${{ secrets.ETH_GOERLI_PROVIDER_URL }}
ETH_GOERLI_PROVIDER_URL: ${{ secrets.ETH_GOERLI_PROVIDER_URL }}
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ flags:
js-sdk:
paths: packages/js-sdk
sdk-core:
paths: packages/sdk-core
paths: packages/sdk-core