Skip to content

Commit 4a9d90a

Browse files
authored
Merge pull request #569 from nextcloud/backport/554/stable26
[stable26] chore(CI): Update master php testing versions and workflow templates
2 parents be63e68 + 815cf72 commit 4a9d90a

File tree

8 files changed

+110
-54
lines changed

8 files changed

+110
-54
lines changed

.drone.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kind: pipeline
22
name: checkers
33
steps:
44
- name: compatibility
5-
image: nextcloudci/php7.4:php7.4-2
5+
image: nextcloudci/php8.0:latest
66
environment:
77
APP_NAME: ldap_write_support
88
CORE_BRANCH: master
@@ -12,15 +12,6 @@ steps:
1212
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
1313
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
1414
- cd ../server
15-
- name: syntax-php7.4
16-
image: nextcloudci/php7.4:php7.4-2
17-
environment:
18-
APP_NAME: ldap_write_support
19-
CORE_BRANCH: stable26
20-
DB: sqlite
21-
commands:
22-
- composer install
23-
- ./vendor/bin/parallel-lint --exclude ./vendor/ .
2415
- name: syntax-php8.0
2516
image: nextcloudci/php8.0:latest
2617
environment:
@@ -43,7 +34,7 @@ kind: pipeline
4334
name: integration-master
4435
steps:
4536
- name: integration
46-
image: nextcloudci/php7.4:php7.4-2
37+
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
4738
environment:
4839
APP_NAME: ldap_write_support
4940
CORE_BRANCH: stable26
@@ -66,9 +57,9 @@ steps:
6657

6758
services:
6859
- name: cache
69-
image: redis
60+
image: ghcr.io/nextcloud/continuous-integration-redis:latest
7061
- name: openldap
71-
image: nextcloudci/openldap:openldap-7
62+
image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7
7263
environment:
7364
SLAPD_DOMAIN: nextcloud.ci
7465
SLAPD_ORGANIZATION: Nextcloud
@@ -89,7 +80,7 @@ kind: pipeline
8980
name: integration-master-nocache
9081
steps:
9182
- name: integration
92-
image: nextcloudci/php7.4:php7.4-2
83+
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
9384
environment:
9485
APP_NAME: ldap_write_support
9586
CORE_BRANCH: stable26
@@ -107,7 +98,7 @@ steps:
10798

10899
services:
109100
- name: openldap
110-
image: nextcloudci/openldap:openldap-7
101+
image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7
111102
environment:
112103
SLAPD_DOMAIN: nextcloud.ci
113104
SLAPD_ORGANIZATION: Nextcloud

.github/workflows/appstore-build-publish.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
types: [published]
1111

1212
env:
13-
PHP_VERSION: 7.4
13+
PHP_VERSION: 8.1
1414

1515
jobs:
1616
build_and_publish:
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Check actor permission
24-
uses: skjnldsv/check-actor-permission@v2
24+
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
2525
with:
2626
require: write
2727

@@ -32,31 +32,31 @@ jobs:
3232
echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
3333
3434
- name: Checkout
35-
uses: actions/checkout@v3
35+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
3636
with:
3737
path: ${{ env.APP_NAME }}
3838

3939
- name: Get appinfo data
4040
id: appinfo
41-
uses: skjnldsv/xpath-action@master
41+
uses: skjnldsv/xpath-action@7e6a7c379d0e9abc8acaef43df403ab4fc4f770c # master
4242
with:
4343
filename: ${{ env.APP_NAME }}/appinfo/info.xml
4444
expression: "//info//dependencies//nextcloud/@min-version"
4545

4646
- name: Read package.json node and npm engines version
47-
uses: skjnldsv/read-package-engines-version-actions@v1.2
47+
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
4848
id: versions
4949
# Continue if no package.json
5050
continue-on-error: true
5151
with:
5252
path: ${{ env.APP_NAME }}
53-
fallbackNode: "^12"
54-
fallbackNpm: "^6"
53+
fallbackNode: "^16"
54+
fallbackNpm: "^7"
5555

5656
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
5757
# Skip if no package.json
5858
if: ${{ steps.versions.outputs.nodeVersion }}
59-
uses: actions/setup-node@v3
59+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
6060
with:
6161
node-version: ${{ steps.versions.outputs.nodeVersion }}
6262

@@ -66,14 +66,16 @@ jobs:
6666
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
6767

6868
- name: Set up php ${{ env.PHP_VERSION }}
69-
uses: shivammathur/setup-php@v2
69+
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
7070
with:
7171
php-version: ${{ env.PHP_VERSION }}
7272
coverage: none
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7375

7476
- name: Check composer.json
7577
id: check_composer
76-
uses: andstor/file-existence-action@v2
78+
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
7779
with:
7880
files: "${{ env.APP_NAME }}/composer.json"
7981

@@ -93,15 +95,15 @@ jobs:
9395
9496
- name: Check Krankerl config
9597
id: krankerl
96-
uses: andstor/file-existence-action@v2
98+
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
9799
with:
98100
files: ${{ env.APP_NAME }}/krankerl.toml
99101

100102
- name: Install Krankerl
101103
if: steps.krankerl.outputs.files_exists == 'true'
102104
run: |
103-
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.13.0/krankerl_0.13.0_amd64.deb
104-
sudo dpkg -i krankerl_0.13.0_amd64.deb
105+
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.14.0/krankerl_0.14.0_amd64.deb
106+
sudo dpkg -i krankerl_0.14.0_amd64.deb
105107
106108
- name: Package ${{ env.APP_NAME }} ${{ env.APP_VERSION }} with krankerl
107109
if: steps.krankerl.outputs.files_exists == 'true'
@@ -124,7 +126,7 @@ jobs:
124126
unzip latest-$NCVERSION.zip
125127
126128
- name: Checkout server master fallback
127-
uses: actions/checkout@v3
129+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
128130
if: ${{ steps.server-checkout.outcome != 'success' }}
129131
with:
130132
repository: nextcloud/server
@@ -146,7 +148,7 @@ jobs:
146148
tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }}
147149
148150
- name: Attach tarball to github release
149-
uses: svenstaro/upload-release-action@v2
151+
uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 # v2
150152
id: attach_to_release
151153
with:
152154
repo_token: ${{ secrets.GITHUB_TOKEN }}
@@ -156,7 +158,7 @@ jobs:
156158
overwrite: true
157159

158160
- name: Upload app to Nextcloud appstore
159-
uses: nextcloud-releases/nextcloud-appstore-push-action@v1
161+
uses: nextcloud-releases/nextcloud-appstore-push-action@a011fe619bcf6e77ddebc96f9908e1af4071b9c1 # v1
160162
with:
161163
app_name: ${{ env.APP_NAME }}
162164
appstore_token: ${{ secrets.APPSTORE_TOKEN }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
7+
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
8+
9+
name: Lint
10+
11+
on:
12+
pull_request:
13+
paths-ignore:
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'
25+
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
lint:
31+
permissions:
32+
contents: none
33+
34+
runs-on: ubuntu-latest
35+
36+
name: eslint
37+
38+
steps:
39+
- run: 'echo "No eslint required"'

.github/workflows/lint-eslint.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@
22
#
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions
7+
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
58

69
name: Lint
710

8-
on: pull_request
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'
925

1026
permissions:
1127
contents: read
1228

13-
concurrency:
29+
concurrency:
1430
group: lint-eslint-${{ github.head_ref || github.run_id }}
1531
cancel-in-progress: true
1632

@@ -22,17 +38,17 @@ jobs:
2238

2339
steps:
2440
- name: Checkout
25-
uses: actions/checkout@v3
41+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
2642

2743
- name: Read package.json node and npm engines version
28-
uses: skjnldsv/read-package-engines-version-actions@v1.2
44+
uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2
2945
id: versions
3046
with:
31-
fallbackNode: '^12'
32-
fallbackNpm: '^6'
47+
fallbackNode: '^16'
48+
fallbackNpm: '^7'
3349

3450
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
35-
uses: actions/setup-node@v3
51+
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
3652
with:
3753
node-version: ${{ steps.versions.outputs.nodeVersion }}
3854

.github/workflows/lint-info-xml.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,24 @@ on:
1616
permissions:
1717
contents: read
1818

19+
concurrency:
20+
group: lint-info-xml-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
1923
jobs:
2024
xml-linters:
2125
runs-on: ubuntu-latest
2226

2327
name: info.xml lint
2428
steps:
2529
- name: Checkout
26-
uses: actions/checkout@v3
30+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
2731

2832
- name: Download schema
2933
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
3034

3135
- name: Lint info.xml
32-
uses: ChristophWurst/xmllint-action@v1
36+
uses: ChristophWurst/xmllint-action@d18a551aab4728e4af449617638600634d7a48cb # v1
3337
with:
3438
xml-file: ./appinfo/info.xml
3539
xml-schema-file: ./info.xsd

.github/workflows/lint-php-cs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on: pull_request
1010
permissions:
1111
contents: read
1212

13-
concurrency:
13+
concurrency:
1414
group: lint-php-cs-${{ github.head_ref || github.run_id }}
1515
cancel-in-progress: true
1616

@@ -22,13 +22,15 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
2626

2727
- name: Set up php
28-
uses: shivammathur/setup-php@v2
28+
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
2929
with:
30-
php-version: "7.4"
30+
php-version: 8.1
3131
coverage: none
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3234

3335
- name: Install dependencies
3436
run: composer i

.github/workflows/lint-php.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
permissions:
1717
contents: read
1818

19-
concurrency:
19+
concurrency:
2020
group: lint-php-${{ github.head_ref || github.run_id }}
2121
cancel-in-progress: true
2222

@@ -25,19 +25,21 @@ jobs:
2525
runs-on: ubuntu-latest
2626
strategy:
2727
matrix:
28-
php-versions: ["7.4", "8.0", "8.1"]
28+
php-versions: [ "8.0", "8.1", "8.2" ]
2929

3030
name: php-lint
3131

3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
3535

3636
- name: Set up php ${{ matrix.php-versions }}
37-
uses: shivammathur/setup-php@v2
37+
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
3838
with:
3939
php-version: ${{ matrix.php-versions }}
4040
coverage: none
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4143

4244
- name: Lint
4345
run: composer run lint

0 commit comments

Comments
 (0)