Skip to content

Commit a0181ad

Browse files
committed
Temp
Signed-off-by: Levko Kravets <levko.ne@gmail.com>
1 parent 0478a7d commit a0181ad

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

.github/workflows/main.yml

+19-18
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
node-version: ['16', '18', '20']
4040
env:
4141
cache-name: cache-node-modules
42+
NYC_REPORT_DIR: coverage_unit_node${{ matrix.node-version }}
4243

4344
steps:
4445
- uses: actions/setup-node@v4
@@ -58,12 +59,12 @@ jobs:
5859
run: |
5960
npm ci
6061
npm run test
61-
- run: tar -cvf coverage_unit.tar coverage_unit
62+
- run: tar -cvf ${{ env.NYC_REPORT_DIR }}.tar ${{ env.NYC_REPORT_DIR }}
6263
- name: Store coverage report
6364
uses: actions/upload-artifact@v3
6465
with:
65-
name: coverage_unit
66-
path: coverage_unit.tar
66+
name: ${{ env.NYC_REPORT_DIR }}
67+
path: ${{ env.NYC_REPORT_DIR }}.tar
6768
retention-days: 1
6869

6970
e2e-test:
@@ -75,6 +76,7 @@ jobs:
7576
E2E_ACCESS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
7677
E2E_TABLE_SUFFIX: ${{github.sha}}
7778
cache-name: cache-node-modules
79+
NYC_REPORT_DIR: coverage_e2e
7880

7981
steps:
8082
- uses: actions/checkout@v3
@@ -91,12 +93,12 @@ jobs:
9193
run: |
9294
npm ci
9395
NODE_OPTIONS="--max-old-space-size=4096" npm run e2e
94-
- run: tar -cvf coverage_e2e.tar coverage_e2e
96+
- run: tar -cvf ${{ env.NYC_REPORT_DIR }}.tar ${{ env.NYC_REPORT_DIR }}
9597
- name: Store coverage report
9698
uses: actions/upload-artifact@v3
9799
with:
98-
name: coverage_e2e
99-
path: coverage_e2e.tar
100+
name: ${{ env.NYC_REPORT_DIR }}
101+
path: ${{ env.NYC_REPORT_DIR }}.tar
100102
retention-days: 1
101103

102104
coverage:
@@ -118,15 +120,14 @@ jobs:
118120
${{ runner.os }}-
119121
- uses: actions/download-artifact@v3
120122
with:
121-
name: coverage_unit
122-
- uses: actions/download-artifact@v3
123-
with:
124-
name: coverage_e2e
125-
- run: tar -xvf coverage_unit.tar && rm coverage_unit.tar
126-
- run: tar -xvf coverage_e2e.tar && rm coverage_e2e.tar
127-
- name: Coverage
128-
uses: codecov/codecov-action@v3
129-
with:
130-
token: ${{ secrets.CODECOV_TOKEN }}
131-
fail_ci_if_error: true
132-
verbose: true
123+
pattern: coverage_*
124+
merge-multiple: true
125+
- run: ls -la coverage_e2e
126+
# - run: tar -xvf coverage_unit.tar && rm coverage_unit.tar
127+
# - run: tar -xvf coverage_e2e.tar && rm coverage_e2e.tar
128+
# - name: Coverage
129+
# uses: codecov/codecov-action@v3
130+
# with:
131+
# token: ${{ secrets.CODECOV_TOKEN }}
132+
# fail_ci_if_error: true
133+
# verbose: true

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
},
1414
"scripts": {
1515
"prepare": "npm run build",
16-
"e2e": "nyc --reporter=lcov --report-dir=coverage_e2e mocha --config tests/e2e/.mocharc.js",
17-
"test": "nyc --reporter=lcov --report-dir=coverage_unit mocha --config tests/unit/.mocharc.js",
16+
"e2e": "nyc --reporter=lcov --report-dir=${NYC_REPORT_DIR:-coverage_e2e} mocha --config tests/e2e/.mocharc.js",
17+
"test": "nyc --reporter=lcov --report-dir=${NYC_REPORT_DIR:-coverage_unit} mocha --config tests/unit/.mocharc.js",
1818
"update-version": "node bin/update-version.js && prettier --write ./lib/version.ts",
1919
"build": "npm run update-version && tsc",
2020
"watch": "tsc -w",

0 commit comments

Comments
 (0)