Skip to content

Commit b34df2d

Browse files
committed
Add codecov upload
Signed-off-by: John Molakvoæ <[email protected]>
1 parent 9b82bd3 commit b34df2d

File tree

3 files changed

+47
-8
lines changed

3 files changed

+47
-8
lines changed

.github/workflows/node-test.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
name: Node
7+
8+
on:
9+
pull_request:
10+
push:
11+
branches:
12+
- main
13+
- master
14+
- stable*
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
20+
name: test
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
25+
- name: Read package.json node and npm engines version
26+
uses: skjnldsv/[email protected]
27+
id: versions
28+
with:
29+
fallbackNode: '^12'
30+
fallbackNpm: '^6'
31+
32+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: ${{ steps.versions.outputs.nodeVersion }}
36+
37+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
38+
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Testing
44+
run: npm run test:coverage --if-present
45+
46+
- name: Upload coverage
47+
uses: codecov/codecov-action@v2

.github/workflows/node.yml

-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,3 @@ jobs:
5151
run: |
5252
git status
5353
git --no-pager diff
54-
55-
- name: Testing
56-
run: |
57-
npm run test --if-present

jest.config.js

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ module.exports = {
77
'src/**/*.{js,vue}',
88
'!**/node_modules/**',
99
],
10-
coverageReporters: [
11-
'html',
12-
'text-summary',
13-
],
1410
setupFilesAfterEnv: [
1511
'<rootDir>/tests/setup.js',
1612
],

0 commit comments

Comments
 (0)