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,60 +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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6434 with :
6535 persist-credentials : false
6636
67- - name : Read package.json node and npm engines version
68- 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
6939 id : versions
70- with :
71- fallbackNode : ' ^20'
72- fallbackNpm : ' ^10'
7340
74- - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
75- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1 .0
41+ - name : Set up node
42+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0 .0
7643 with :
77- node-version : ${{ steps.versions.outputs.nodeVersion }}
44+ node-version : ${{ steps.versions.outputs.node-version }}
7845
79- - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
80- 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 }}'
8148
8249 - name : Install dependencies & build
8350 env :
9360 run : npm run test:coverage --if-present
9461
9562 - name : Collect coverage
96- uses : codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
63+ uses : codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
9764 with :
9865 files : ./coverage/lcov.info
99-
100- summary :
101- permissions :
102- contents : none
103- runs-on : ubuntu-latest
104- needs : [changes, test]
105-
106- if : always()
107-
108- name : test-summary
109-
110- steps :
111- - name : Summary status
112- 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