11# This workflow is provided via the organization template repository
22#
3- # https://github.com/nextcloud/.github
3+ # https://github.com/nextcloud-libraries /.github
44# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55#
66# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
@@ -24,58 +24,27 @@ concurrency:
2424 cancel-in-progress : true
2525
2626jobs :
27- changes :
28- runs-on : ubuntu-latest
29- permissions :
30- contents : read
31- pull-requests : read
32-
33- outputs :
34- src : ${{ steps.changes.outputs.src}}
35-
36- steps :
37- - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
38- id : changes
39- continue-on-error : true
40- with :
41- filters : |
42- src:
43- - '.github/workflows/**'
44- - '__tests__/**'
45- - '__mocks__/**'
46- - 'src/**'
47- - 'appinfo/info.xml'
48- - 'package.json'
49- - 'package-lock.json'
50- - 'tsconfig.json'
51- - '**.js'
52- - '**.ts'
53- - '**.vue'
54-
5527 test :
5628 runs-on : ubuntu-latest
57-
58- needs : changes
59- if : needs.changes.outputs.src != 'false'
29+ name : node-tests
6030
6131 steps :
6232 - name : Checkout
63- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+ with :
35+ persist-credentials : false
6436
65- - name : Read package.json node and npm engines version
66- uses : skjnldsv/read -package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
37+ - name : Read package.json
38+ uses : nextcloud-libraries/parse -package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
6739 id : versions
68- with :
69- fallbackNode : ' ^20'
70- fallbackNpm : ' ^10'
7140
72- - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
73- uses : actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 .0.3
41+ - name : Set up node
42+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 .0.0
7443 with :
75- node-version : ${{ steps.versions.outputs.nodeVersion }}
44+ node-version : ${{ steps.versions.outputs.node-version }}
7645
77- - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
78- run : npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
46+ - name : Set up npm
47+ run : npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
7948
8049 - name : Install dependencies & build
8150 env :
9160 run : npm run test:coverage --if-present
9261
9362 - name : Collect coverage
94- uses : codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4 .5.0
63+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5 .5.1
9564 with :
9665 files : ./coverage/lcov.info
97-
98- summary :
99- permissions :
100- contents : none
101- runs-on : ubuntu-latest
102- needs : [changes, test]
103-
104- if : always()
105-
106- name : test-summary
107-
108- steps :
109- - name : Summary status
110- run : if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
66+ env :
67+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments