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,55 +24,27 @@ concurrency:
2424 cancel-in-progress : true
2525
2626jobs :
27- changes :
28- runs-on : ubuntu-latest
29-
30- outputs :
31- src : ${{ steps.changes.outputs.src}}
32-
33- steps :
34- - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
35- id : changes
36- continue-on-error : true
37- with :
38- filters : |
39- src:
40- - '.github/workflows/**'
41- - '__tests__/**'
42- - '__mocks__/**'
43- - 'src/**'
44- - 'appinfo/info.xml'
45- - 'package.json'
46- - 'package-lock.json'
47- - 'tsconfig.json'
48- - '**.js'
49- - '**.ts'
50- - '**.vue'
51-
5227 test :
5328 runs-on : ubuntu-latest
54-
55- needs : changes
56- if : needs.changes.outputs.src != 'false'
29+ name : node-tests
5730
5831 steps :
5932 - name : Checkout
60- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
33+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+ with :
35+ persist-credentials : false
6136
62- - name : Read package.json node and npm engines version
63- uses : skjnldsv/read -package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
37+ - name : Read package.json
38+ uses : nextcloud-libraries/parse -package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
6439 id : versions
65- with :
66- fallbackNode : ' ^20'
67- fallbackNpm : ' ^10'
6840
69- - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
70- uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 .0.2
41+ - name : Set up node
42+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 .0.0
7143 with :
72- node-version : ${{ steps.versions.outputs.nodeVersion }}
44+ node-version : ${{ steps.versions.outputs.node-version }}
7345
74- - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
75- 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 }}'
7648
7749 - name : Install dependencies & build
7850 env :
8860 run : npm run test:coverage --if-present
8961
9062 - name : Collect coverage
91- uses : codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
63+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
9264 with :
9365 files : ./coverage/lcov.info
94-
95- summary :
96- permissions :
97- contents : none
98- runs-on : ubuntu-latest
99- needs : [changes, test]
100-
101- if : always()
102-
103- name : test-summary
104-
105- steps :
106- - name : Summary status
107- 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