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,53 +24,20 @@ 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- - 'cypress/**'
42- - 'lib/**'
43- - 'package.json'
44- - 'package-lock.json'
45- - 'tsconfig.json'
46- - '**.js'
47- - '**.ts'
48- - '**.vue'
49-
5027 test :
5128 runs-on : ubuntu-latest
52-
53- needs : changes
54- if : needs.changes.outputs.src != 'false'
29+ name : node-tests
5530
5631 steps :
5732 - name : Checkout
58- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59-
60- - name : Read package.json node and npm engines version
61- uses : skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
62- id : versions
33+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6334 with :
64- fallbackNode : ' ^22'
65- fallbackNpm : ' ^10.5'
35+ persist-credentials : false
6636
67- - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
68- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1 .0
37+ - name : Set up node
38+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
6939 with :
70- node-version : ${{ steps.versions.outputs.nodeVersion }}
71-
72- - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
73- run : npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
40+ node-version-file : ' package.json'
7441
7542 - name : Install dependencies & build
7643 env :
8653 run : npm run test:coverage --if-present
8754
8855 - name : Collect coverage
89- uses : codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
56+ uses : codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
9057 with :
9158 files : ./coverage/lcov.info
92-
93- summary :
94- permissions :
95- contents : none
96- runs-on : ubuntu-latest
97- needs : [changes, test]
98-
99- if : always()
100-
101- name : test-summary
102-
103- steps :
104- - name : Summary status
105- run : if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi
59+ env :
60+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments