Skip to content

Commit d4026c6

Browse files
committed
test: add legacy ci names
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 4406d90 commit d4026c6

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed

.github/workflows/node-test.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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+
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Node tests
10+
11+
on:
12+
pull_request:
13+
push:
14+
branches:
15+
- main
16+
- master
17+
- stable*
18+
19+
permissions:
20+
contents: read
21+
22+
concurrency:
23+
group: node-tests-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
changes:
28+
runs-on: ubuntu-latest-low
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+
55+
test:
56+
runs-on: ubuntu-latest
57+
58+
needs: changes
59+
if: needs.changes.outputs.src != 'false'
60+
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
64+
with:
65+
persist-credentials: false
66+
67+
- name: Read package.json node and npm engines version
68+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
69+
id: versions
70+
with:
71+
fallbackNode: '^24'
72+
fallbackNpm: '^11.3'
73+
74+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
75+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
76+
with:
77+
node-version: ${{ steps.versions.outputs.nodeVersion }}
78+
79+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
80+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
81+
82+
- name: Install dependencies & build
83+
env:
84+
CYPRESS_INSTALL_BINARY: 0
85+
run: |
86+
npm ci
87+
npm run build --if-present
88+
89+
- name: Test
90+
run: npm run test --if-present
91+
92+
- name: Test and process coverage
93+
run: npm run test:coverage --if-present
94+
95+
- name: Collect coverage
96+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
97+
with:
98+
files: ./coverage/lcov.info
99+
100+
summary:
101+
permissions:
102+
contents: none
103+
runs-on: ubuntu-latest-low
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
113+
114+
legacy:
115+
permissions:
116+
contents: none
117+
runs-on: ubuntu-latest-low
118+
needs: [summary]
119+
120+
if: always()
121+
name: Front-end unit tests
122+
steps:
123+
- name: Summary status
124+
run: if ${{ needs.summary.result != 'success' }}; then exit 1; fi

.github/workflows/phpunit-sqlite.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,27 @@ jobs:
185185
steps:
186186
- name: Summary status
187187
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
188+
189+
legacy:
190+
permissions:
191+
contents: none
192+
runs-on: ubuntu-latest-low
193+
needs: [summary]
194+
195+
if: always()
196+
name: Nextcloud stable31 php8.3 unit tests
197+
steps:
198+
- name: Summary status
199+
run: if ${{ needs.summary.result != 'success' }}; then exit 1; fi
200+
201+
legacy31:
202+
permissions:
203+
contents: none
204+
runs-on: ubuntu-latest-low
205+
needs: [summary]
206+
207+
if: always()
208+
name: Nextcloud stable31 php8.3 unit tests
209+
steps:
210+
- name: Summary status
211+
run: if ${{ needs.summary.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)