ci: added codecov to test action
This commit is contained in:
parent
5dccd4e08a
commit
56ede3dd8e
2 changed files with 12 additions and 3 deletions
14
.github/workflows/test.yaml
vendored
14
.github/workflows/test.yaml
vendored
|
@ -3,14 +3,15 @@ name: Node.js CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
paths-ignore:
|
||||||
|
- '*.md' # ignore changes to readmes
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
#
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.actor != 'mtcute-bot' # do not after release
|
if: github.actor != 'mtcute-bot' # do not run after release
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -34,7 +35,14 @@ jobs:
|
||||||
run: pnpm run lint:ci
|
run: pnpm run lint:ci
|
||||||
- name: 'Circular dependencies'
|
- name: 'Circular dependencies'
|
||||||
run: pnpm run lint:dpdm
|
run: pnpm run lint:dpdm
|
||||||
- run: pnpm run test
|
- run: pnpm run test:ci
|
||||||
|
- name: Upload coverage reports to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
if: ${{ matrix.node-version == '18.x' }} # to avoid uploading twice
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
with:
|
||||||
|
files: ./coverage/coverage-final.json
|
||||||
e2e:
|
e2e:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
needs: test
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"test:dev": "vitest watch",
|
"test:dev": "vitest watch",
|
||||||
"test:ui": "vitest --ui",
|
"test:ui": "vitest --ui",
|
||||||
"test:coverage": "vitest run --coverage",
|
"test:coverage": "vitest run --coverage",
|
||||||
|
"test:ci": "vitest run --coverage.enabled --coverage.reporter=json",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:ci": "NODE_OPTIONS=\"--max_old_space_size=8192\" eslint --config .eslintrc.ci.js .",
|
"lint:ci": "NODE_OPTIONS=\"--max_old_space_size=8192\" eslint --config .eslintrc.ci.js .",
|
||||||
"lint:tsc": "pnpm -r --parallel exec tsc --build",
|
"lint:tsc": "pnpm -r --parallel exec tsc --build",
|
||||||
|
|
Loading…
Reference in a new issue