Skip to content

Commit ee9f6f3

Browse files
authored
Merge pull request #5184 from nextcloud-libraries/chore/noid/merge-master-next
[next] chore(master): merge `master` into `next`
2 parents 73eb961 + e638b3e commit ee9f6f3

File tree

16 files changed

+2317
-1116
lines changed

16 files changed

+2317
-1116
lines changed

.github/workflows/command-l10n-update.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
uses: skjnldsv/read-package-engines-version-actions@v2
5353
id: package-engines-versions
5454
with:
55-
fallbackNode: '^14'
56-
fallbackNpm: '^7'
55+
fallbackNode: '^20'
56+
fallbackNpm: '^10'
5757

5858
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
5959
uses: actions/setup-node@v4

.github/workflows/command-rebase.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/lint-eslint.yml

Lines changed: 53 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,7 @@
88

99
name: Lint eslint
1010

11-
on:
12-
pull_request:
13-
paths:
14-
- '.github/workflows/**'
15-
- 'src/**'
16-
- 'appinfo/info.xml'
17-
- 'package.json'
18-
- 'package-lock.json'
19-
- 'tsconfig.json'
20-
- '.eslintrc.*'
21-
- '.eslintignore'
22-
- '**.js'
23-
- '**.ts'
24-
- '**.vue'
11+
on: pull_request
2512

2613
permissions:
2714
contents: read
@@ -31,32 +18,78 @@ concurrency:
3118
cancel-in-progress: true
3219

3320
jobs:
21+
changes:
22+
runs-on: ubuntu-latest
23+
24+
outputs:
25+
src: ${{ steps.changes.outputs.src}}
26+
27+
steps:
28+
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
29+
id: changes
30+
continue-on-error: true
31+
with:
32+
filters: |
33+
src:
34+
- '.github/workflows/**'
35+
- 'src/**'
36+
- 'appinfo/info.xml'
37+
- 'package.json'
38+
- 'package-lock.json'
39+
- 'tsconfig.json'
40+
- '.eslintrc.*'
41+
- '.eslintignore'
42+
- '**.js'
43+
- '**.ts'
44+
- '**.vue'
45+
3446
lint:
3547
runs-on: ubuntu-latest
3648

37-
name: eslint
49+
needs: changes
50+
if: needs.changes.outputs.src != 'false'
51+
52+
name: NPM lint
3853

3954
steps:
4055
- name: Checkout
41-
uses: actions/checkout@v4 # v3.5.2
56+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4257

4358
- name: Read package.json node and npm engines version
44-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
59+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
4560
id: versions
4661
with:
47-
fallbackNode: '^16'
48-
fallbackNpm: '^7'
62+
fallbackNode: '^20'
63+
fallbackNpm: '^9'
4964

5065
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
51-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
66+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
5267
with:
5368
node-version: ${{ steps.versions.outputs.nodeVersion }}
5469

5570
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
5671
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
5772

5873
- name: Install dependencies
74+
env:
75+
CYPRESS_INSTALL_BINARY: 0
76+
PUPPETEER_SKIP_DOWNLOAD: true
5977
run: npm ci
6078

6179
- name: Lint
6280
run: npm run lint
81+
82+
summary:
83+
permissions:
84+
contents: none
85+
runs-on: ubuntu-latest
86+
needs: [changes, lint]
87+
88+
if: always()
89+
90+
# This is the summary, we just avoid to rename it so that branch protection rules still match
91+
name: eslint
92+
93+
steps:
94+
- name: Summary status
95+
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi

.github/workflows/lint-stylelint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,26 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v4 # v3.5.2
25+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2626

2727
- name: Read package.json node and npm engines version
28-
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
28+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
2929
id: versions
3030
with:
31-
fallbackNode: '^16'
32-
fallbackNpm: '^7'
31+
fallbackNode: '^20'
32+
fallbackNpm: '^9'
3333

3434
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
35-
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3
35+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3
3636
with:
3737
node-version: ${{ steps.versions.outputs.nodeVersion }}
3838

3939
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
4040
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
4141

4242
- name: Install dependencies
43+
env:
44+
CYPRESS_INSTALL_BINARY: 0
4345
run: npm ci
4446

4547
- name: Lint

.github/workflows/node-test.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Node tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- stable*
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: node-tests-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
changes:
20+
runs-on: ubuntu-latest
21+
22+
outputs:
23+
src: ${{ steps.changes.outputs.src}}
24+
25+
steps:
26+
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
27+
id: changes
28+
continue-on-error: true
29+
with:
30+
filters: |
31+
src:
32+
- '.github/workflows/**'
33+
- '__tests__/**'
34+
- '__mocks__/**'
35+
- 'src/**'
36+
- 'appinfo/info.xml'
37+
- 'package.json'
38+
- 'package-lock.json'
39+
- 'tsconfig.json'
40+
- '**.js'
41+
- '**.ts'
42+
- '**.vue'
43+
44+
test:
45+
runs-on: ubuntu-latest
46+
47+
needs: changes
48+
if: needs.changes.outputs.src != 'false'
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
53+
54+
- name: Read package.json node and npm engines version
55+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
56+
id: versions
57+
with:
58+
fallbackNode: '^20'
59+
fallbackNpm: '^9'
60+
61+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
62+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
63+
with:
64+
node-version: ${{ steps.versions.outputs.nodeVersion }}
65+
66+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
67+
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
68+
69+
- name: Install dependencies & build
70+
env:
71+
CYPRESS_INSTALL_BINARY: 0
72+
run: |
73+
npm ci
74+
npm run build --if-present
75+
76+
- name: Test
77+
run: npm run test --if-present
78+
79+
- name: Test and process coverage
80+
run: npm run test:coverage --if-present
81+
82+
- name: Collect coverage
83+
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
84+
with:
85+
files: ./coverage/lcov.info
86+
87+
summary:
88+
permissions:
89+
contents: none
90+
runs-on: ubuntu-latest
91+
needs: [changes, test]
92+
93+
if: always()
94+
95+
name: test-summary
96+
97+
steps:
98+
- name: Summary status
99+
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' }}; then exit 1; fi

.github/workflows/node.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)