From 60624a3fd6999e081766b50def0e2c4e1955d1e7 Mon Sep 17 00:00:00 2001 From: Dmitry Tyshchenko Date: Wed, 1 Jul 2020 05:31:04 +0300 Subject: [PATCH] chore: upload codecov reports all at once (#3856) --- .github/workflows/functional.yml | 276 +++++++++++++++++-------------- .github/workflows/unit.yml | 266 +++++++++++++++-------------- .gitignore | 3 + 3 files changed, 298 insertions(+), 247 deletions(-) diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 03fa128f10..39304aecd6 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -9,6 +9,51 @@ on: types: [ready_for_review, synchronize, opened] jobs: + codecov: + needs: + - core-database + - bridgechain-registration + - bridgechain-resignation + - bridgechain-update + - business-registration + - business-resignation + - business-update + - delegate-registration + - delegate-resignation + - htlc-claim + - htlc-lock + - htlc-refund + - ipfs + - multi-payment + - multi-signature-registration + - second-signature-registration + - transfer + - vote + - entity-register + - entity-resign + - entity-update + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v1 + + - name: Download code coverage + uses: actions/download-artifact@v2 + with: + path: .artifacts + + - name: Upload code coverage to codecov.io + uses: codecov/codecov-action@v1 + with: + file: .artifacts/*-coverage/lcov.info + flags: functional + fail_ci_if_error: true + core-database: runs-on: ubuntu-latest @@ -60,14 +105,13 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/core-database/ --coverage --coverageDirectory .coverage/functional/core-database/ + run: yarn test __tests__/functional/core-database/ --coverage --coverageDirectory .coverage/functional/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/core-database/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info bridgechain-registration: runs-on: ubuntu-latest @@ -113,17 +157,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/bridgechain-registration.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/bridgechain-registration/ + run: yarn test __tests__/functional/transaction-forging/bridgechain-registration.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/bridgechain-registration/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info bridgechain-resignation: runs-on: ubuntu-latest @@ -169,17 +212,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/bridgechain-resignation.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/bridgechain-resignation/ + run: yarn test __tests__/functional/transaction-forging/bridgechain-resignation.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/bridgechain-resignation/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info bridgechain-update: runs-on: ubuntu-latest @@ -225,17 +267,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/bridgechain-update.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/bridgechain-update/ + run: yarn test __tests__/functional/transaction-forging/bridgechain-update.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/bridgechain-update/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info business-registration: runs-on: ubuntu-latest @@ -281,17 +322,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/business-registration.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/business-registration/ + run: yarn test __tests__/functional/transaction-forging/business-registration.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/business-registration/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info business-resignation: runs-on: ubuntu-latest @@ -337,17 +377,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/business-resignation.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/business-resignation/ + run: yarn test __tests__/functional/transaction-forging/business-resignation.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/business-resignation/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info business-update: runs-on: ubuntu-latest @@ -393,17 +432,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/business-update.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/business-update/ + run: yarn test __tests__/functional/transaction-forging/business-update.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/business-update/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info delegate-registration: runs-on: ubuntu-latest @@ -449,17 +487,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/delegate-registration.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/delegate-registration/ + run: yarn test __tests__/functional/transaction-forging/delegate-registration.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/delegate-registration/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info delegate-resignation: runs-on: ubuntu-latest @@ -505,17 +542,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/delegate-resignation.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/delegate-resignation/ + run: yarn test __tests__/functional/transaction-forging/delegate-resignation.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/delegate-resignation/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info htlc-claim: runs-on: ubuntu-latest @@ -561,17 +597,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/htlc-claim.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/htlc-claim/ + run: yarn test __tests__/functional/transaction-forging/htlc-claim.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/htlc-claim/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info htlc-lock: runs-on: ubuntu-latest @@ -617,17 +652,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/htlc-lock.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/htlc-lock/ + run: yarn test __tests__/functional/transaction-forging/htlc-lock.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/htlc-lock/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info htlc-refund: runs-on: ubuntu-latest @@ -673,17 +707,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/htlc-refund.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/htlc-refund/ + run: yarn test __tests__/functional/transaction-forging/htlc-refund.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/htlc-refund/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info ipfs: runs-on: ubuntu-latest @@ -729,17 +762,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/ipfs.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/ipfs/ + run: yarn test __tests__/functional/transaction-forging/ipfs.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/ipfs/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info multi-payment: runs-on: ubuntu-latest @@ -785,17 +817,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/multi-payment.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/multi-payment/ + run: yarn test __tests__/functional/transaction-forging/multi-payment.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/multi-payment/lcov.info - flags: functional - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/functional/${{ github.job }}/lcov.info multi-signature-registration: runs-on: ubuntu-latest @@ -841,17 +872,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/multi-signature-registration.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/multi-signature-registration/ + run: yarn test __tests__/functional/transaction-forging/multi-signature-registration.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/multi-signature-registration/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info second-signature-registration: runs-on: ubuntu-latest @@ -897,17 +927,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/second-signature-registration.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/second-signature-registration/ + run: yarn test __tests__/functional/transaction-forging/second-signature-registration.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/second-signature-registration/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info transfer: runs-on: ubuntu-latest @@ -953,17 +982,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/transfer.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/transfer/ + run: yarn test __tests__/functional/transaction-forging/transfer.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/transfer/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info vote: runs-on: ubuntu-latest @@ -1009,17 +1037,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/vote.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/vote/ + run: yarn test __tests__/functional/transaction-forging/vote.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/vote/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info entity-register: runs-on: ubuntu-latest @@ -1065,17 +1092,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/entity-register.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/entity-register/ + run: yarn test __tests__/functional/transaction-forging/entity-register.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/entity-register/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info entity-resign: runs-on: ubuntu-latest @@ -1121,17 +1147,16 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/entity-resign.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/entity-resign/ + run: yarn test __tests__/functional/transaction-forging/entity-resign.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/entity-resign/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info entity-update: runs-on: ubuntu-latest @@ -1177,14 +1202,13 @@ jobs: run: mkdir -p $HOME/.core/database - name: Functional tests - run: yarn test __tests__/functional/transaction-forging/entity-update.test.ts --coverage --coverageDirectory .coverage/functional/transaction-forging/entity-update/ + run: yarn test __tests__/functional/transaction-forging/entity-update.test.ts --coverage --coverageDirectory .coverage/functional/${{ github.job }} env: CORE_DB_DATABASE: ark_unitnet CORE_DB_USERNAME: ark - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/functional/transaction-forging/entity-update/lcov.info - flags: functional - fail_ci_if_error: true + name: codecov-fun${{ github.job }}-ctional + path: .coverage/functional/${{ github.job }}/lcov.info diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 9dc55a9a8d..b97d269b32 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -9,6 +9,51 @@ on: types: [ready_for_review, synchronize, opened] jobs: + codecov: + needs: + - core + - core-api + - core-blockchain + - core-cli + - core-database + - core-forger + - core-kernel + - core-logger-pino + - core-magistrate-api + - core-magistrate-crypto + - core-magistrate-transactions + - core-manager + - core-p2p + - core-snapshots + - core-state + - core-test-framework + - core-transaction-pool + - core-transactions + - core-webhooks + - crypto + + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - uses: actions/checkout@v1 + + - name: Download code coverage + uses: actions/download-artifact@v2 + with: + path: .artifacts + + - name: Upload code coverage to codecov.io + uses: codecov/codecov-action@v1 + with: + file: .artifacts/*-coverage/lcov.info + flags: unit + fail_ci_if_error: true + core: runs-on: ubuntu-latest @@ -35,14 +80,13 @@ jobs: run: yarn setup - name: Test - run: yarn test __tests__/unit/core/ --coverage --coverageDirectory .coverage/unit/core + run: yarn test __tests__/unit/core/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-api: runs-on: ubuntu-latest @@ -70,14 +114,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-api/ --coverage --coverageDirectory .coverage/unit/core-api + run: yarn test:parallel __tests__/unit/core-api/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-api/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-blockchain: runs-on: ubuntu-latest @@ -105,14 +148,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-blockchain/ --coverage --coverageDirectory .coverage/unit/core-blockchain + run: yarn test:parallel __tests__/unit/core-blockchain/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-blockchain/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-cli: runs-on: ubuntu-latest @@ -140,14 +182,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-cli/ --coverage --coverageDirectory .coverage/unit/core-cli + run: yarn test:parallel __tests__/unit/core-cli/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-cli/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-database: runs-on: ubuntu-latest @@ -175,14 +216,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-database/ --coverage --coverageDirectory .coverage/unit/core-database + run: yarn test:parallel __tests__/unit/core-database/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-database/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-forger: runs-on: ubuntu-latest @@ -210,14 +250,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-forger/ --coverage --coverageDirectory .coverage/unit/core-forger + run: yarn test:parallel __tests__/unit/core-forger/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-forger/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-kernel: runs-on: ubuntu-latest @@ -245,14 +284,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-kernel/ --coverage --coverageDirectory .coverage/unit/core-kernel + run: yarn test:parallel __tests__/unit/core-kernel/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-kernel/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-logger-pino: runs-on: ubuntu-latest @@ -280,14 +318,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-logger-pino/ --coverage --coverageDirectory .coverage/unit/core-logger-pino + run: yarn test:parallel __tests__/unit/core-logger-pino/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-logger-pino/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-magistrate-api: runs-on: ubuntu-latest @@ -315,14 +352,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-magistrate-api/ --coverage --coverageDirectory .coverage/unit/core-magistrate-api + run: yarn test:parallel __tests__/unit/core-magistrate-api/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-magistrate-api/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-magistrate-crypto: runs-on: ubuntu-latest @@ -350,14 +386,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-magistrate-crypto/ --coverage --coverageDirectory .coverage/unit/core-magistrate-crypto + run: yarn test:parallel __tests__/unit/core-magistrate-crypto/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-magistrate-crypto/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-magistrate-transactions: runs-on: ubuntu-latest @@ -385,14 +420,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-magistrate-transactions/ --coverage --coverageDirectory .coverage/unit/core-magistrate-transactions + run: yarn test:parallel __tests__/unit/core-magistrate-transactions/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-magistrate-transactions/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-manager: runs-on: ubuntu-latest @@ -420,14 +454,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-manager/ --coverage --coverageDirectory .coverage/unit/core-manager + run: yarn test:parallel __tests__/unit/core-manager/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-manager/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-p2p: runs-on: ubuntu-latest @@ -455,14 +488,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-p2p/ --coverage --coverageDirectory .coverage/unit/core-p2p + run: yarn test:parallel __tests__/unit/core-p2p/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-p2p/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-snapshots: runs-on: ubuntu-latest @@ -490,14 +522,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-snapshots/ --coverage --coverageDirectory .coverage/unit/core-snapshots + run: yarn test:parallel __tests__/unit/core-snapshots/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-snapshots/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-state: runs-on: ubuntu-latest @@ -525,14 +556,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-state/ --coverage --coverageDirectory .coverage/unit/core-state + run: yarn test:parallel __tests__/unit/core-state/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-state/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-test-framework: runs-on: ubuntu-latest @@ -560,14 +590,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-test-framework/ --coverage --coverageDirectory .coverage/unit/core-test-framework + run: yarn test:parallel __tests__/unit/core-test-framework/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-test-framework/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-transaction-pool: runs-on: ubuntu-latest @@ -595,14 +624,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-transaction-pool/ --coverage --coverageDirectory .coverage/unit/core-transaction-pool + run: yarn test:parallel __tests__/unit/core-transaction-pool/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-transaction-pool/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-transactions: runs-on: ubuntu-latest @@ -630,14 +658,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-transactions/ --coverage --coverageDirectory .coverage/unit/core-transactions + run: yarn test:parallel __tests__/unit/core-transactions/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-transactions/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info core-webhooks: runs-on: ubuntu-latest @@ -665,14 +692,13 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/core-webhooks/ --coverage --coverageDirectory .coverage/unit/core-webhooks + run: yarn test:parallel __tests__/unit/core-webhooks/ --coverage --coverageDirectory .coverage/unit/${{ github.job }} - - name: Codecov - uses: codecov/codecov-action@v1 + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/core-webhooks/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info crypto: runs-on: ubuntu-latest @@ -700,11 +726,9 @@ jobs: run: yarn setup - name: Test - run: yarn test:parallel __tests__/unit/crypto/ --coverage --coverage --coverageDirectory .coverage/unit/crypto - - - name: Codecov - uses: codecov/codecov-action@v1 + run: yarn test:parallel __tests__/unit/crypto/ --coverage --coverage --coverageDirectory .coverage/unit/${{ github.job }} + - name: Archive code coverage + uses: actions/upload-artifact@v2 with: - file: .coverage/unit/crypto/lcov.info - flags: unit - fail_ci_if_error: true + name: ${{ github.job }}-coverage + path: .coverage/unit/${{ github.job }}/lcov.info diff --git a/.gitignore b/.gitignore index 06db4ced52..21adf1a9bb 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ pids # Directory for instrumented libs generated by jscoverage/JSCover lib-cov +# CI artifacts downloaded during build +.artifacts + # Coverage directory used by tools like istanbul .coverage