Skip to content

Commit 9e9cccd

Browse files
authored
Merge pull request #58903 from nextcloud/chore/noid/update-workflows
chore(workflows): remove cypress cloud
2 parents 533125d + a77040f commit 9e9cccd

11 files changed

Lines changed: 150 additions & 97 deletions

.github/workflows/autocheckers.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ jobs:
7474
autocheckers:
7575
runs-on: ubuntu-latest-low
7676

77+
needs: changes
78+
if: needs.changes.outputs.src != 'false'
79+
7780
strategy:
7881
matrix:
7982
php-versions: ['8.2']
@@ -125,4 +128,4 @@ jobs:
125128

126129
steps:
127130
- name: Summary status
128-
run: if ${{ needs.autocheckers.result != 'success' || (needs.changes.outputs.src != 'false' && needs.autoloader.result != 'success') }}; then exit 1; fi
131+
run: if ${{ needs.changes.outputs.src != 'false' && (needs.autocheckers.result != 'success' || needs.autoloader.result != 'success') }}; then exit 1; fi

.github/workflows/command-pull-3rdparty.yml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
permissions:
1616
contents: none
17+
pull-requests: read
1718

1819
# On pull requests and if the comment starts with `/update-3rdparty`
1920
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/update-3rdparty')
@@ -27,8 +28,25 @@ jobs:
2728
comment-id: ${{ github.event.comment.id }}
2829
reactions: '+1'
2930

31+
# issue_comment events carry no pull_request context in their payload, so we
32+
# must fetch the PR via the API. This also gives us base.ref for free, avoiding
33+
# a second API call. The GITHUB_TOKEN needs pull-requests:read (granted above).
34+
- name: Get pull request metadata
35+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
36+
id: get-pr
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
script: |
40+
const pull = await github.rest.pulls.get({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
pull_number: context.issue.number,
44+
});
45+
core.setOutput('head_repo', pull.data.head.repo?.full_name ?? '');
46+
core.setOutput('base_ref', pull.data.base.ref);
47+
3048
- name: Disabled on forks
31-
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
49+
if: steps.get-pr.outputs.head_repo != github.repository
3250
run: |
3351
echo 'Can not execute /update-3rdparty on forks'
3452
exit 1
@@ -46,24 +64,17 @@ jobs:
4664
ref: ${{ steps.comment-branch.outputs.head_ref }}
4765

4866
- name: Register server reference to fallback to master branch
49-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
50-
with:
51-
github-token: ${{secrets.GITHUB_TOKEN}}
52-
script: |
53-
const baseRef = context.payload.pull_request.base.ref
54-
if (baseRef === 'main' || baseRef === 'master') {
55-
core.exportVariable('server_ref', 'master');
56-
console.log('Setting server_ref to master');
57-
} else {
58-
const regex = /^stable(\d+)$/
59-
const match = baseRef.match(regex)
60-
if (match) {
61-
core.exportVariable('server_ref', match[0]);
62-
console.log('Setting server_ref to ' + match[0]);
63-
} else {
64-
console.log('Not based on master/main/stable*, so skipping pull 3rdparty command');
65-
}
66-
}
67+
run: |
68+
base_ref="${{ steps.get-pr.outputs.base_ref }}"
69+
if [[ "$base_ref" == "main" || "$base_ref" == "master" ]]; then
70+
echo "server_ref=master" >> "$GITHUB_ENV"
71+
echo "Setting server_ref to master"
72+
elif [[ "$base_ref" =~ ^stable[0-9]+$ ]]; then
73+
echo "server_ref=$base_ref" >> "$GITHUB_ENV"
74+
echo "Setting server_ref to $base_ref"
75+
else
76+
echo "Not based on master/main/stable*, so skipping pull 3rdparty command"
77+
fi
6778
6879
- name: Setup git
6980
run: |

.github/workflows/files-external-sftp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
- name: Set up sftpd
7474
run: |
7575
sudo mkdir /tmp/sftp
76-
sudo chown -R 0777 /tmp/sftp
76+
sudo chmod -R 0777 /tmp/sftp
7777
if [[ '${{ matrix.sftpd }}' == 'openssh' ]]; then docker run -p 2222:22 --name sftp -d -v /tmp/sftp:/home/test atmoz/sftp 'test:test:::data'; fi
7878
7979
- name: Set up php ${{ matrix.php-versions }}

.github/workflows/integration-dav.yml

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -52,69 +52,69 @@ jobs:
5252
name: ${{ matrix.service }} (${{ matrix.endpoint }} endpoint) php${{ matrix.php-versions }}
5353

5454
steps:
55-
- name: Checkout server
56-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57-
with:
58-
persist-credentials: false
59-
submodules: true
60-
61-
- name: Set up php ${{ matrix.php-versions }}
62-
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
63-
timeout-minutes: 5
64-
with:
65-
php-version: ${{ matrix.php-versions }}
66-
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
67-
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
68-
coverage: 'none'
69-
ini-file: development
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
73-
- name: Set up Python
74-
uses: LizardByte/actions/actions/setup_python@70bb8d394d1c92f6113aeec6ae9cc959a5763d15 # v2026.227.200013
75-
with:
76-
python-version: '2.7'
77-
78-
- name: Set up CalDAVTester
79-
run: |
80-
git clone --depth=1 https://github.com/apple/ccs-caldavtester.git CalDAVTester
81-
git clone --depth=1 https://github.com/apple/ccs-pycalendar.git pycalendar
82-
83-
- name: Set up Nextcloud
84-
run: |
85-
mkdir data
86-
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
87-
# disable the trashbin, so recurrent deletion of the same object works
88-
./occ config:app:set dav calendarRetentionObligation --value=0
89-
# Prepare users
90-
OC_PASS=user01 ./occ user:add --password-from-env user01
91-
OC_PASS=user02 ./occ user:add --password-from-env user02
92-
# Prepare calendars
93-
./occ dav:create-calendar user01 calendar
94-
./occ dav:create-calendar user01 shared
95-
./occ dav:create-calendar user02 calendar
96-
# Prepare address books
97-
./occ dav:create-addressbook user01 addressbook
98-
./occ dav:create-addressbook user02 addressbook
99-
100-
- name: Run Nextcloud
101-
run: |
102-
php -S localhost:8888 &
103-
104-
- name: Run CalDAVTester
105-
run: |
106-
cp "apps/dav/tests/testsuits/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/testsuits/caldavtest/serverinfo.xml"
107-
pushd CalDAVTester
108-
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/testsuits/caldavtest" -o cdt.txt \
109-
"${{ matrix.service }}/current-user-principal.xml" \
110-
"${{ matrix.service }}/sync-report.xml" \
111-
${{ matrix.endpoint == 'new' && format('{0}/sharing-{1}.xml', matrix.service, matrix.service == 'CalDAV' && 'calendars' || 'addressbooks') || ';' }}
112-
popd
113-
114-
- name: Print Nextcloud logs
115-
if: always()
116-
run: |
117-
cat data/nextcloud.log
55+
- name: Checkout server
56+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
57+
with:
58+
persist-credentials: false
59+
submodules: true
60+
61+
- name: Set up php ${{ matrix.php-versions }}
62+
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
63+
timeout-minutes: 5
64+
with:
65+
php-version: ${{ matrix.php-versions }}
66+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
67+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
68+
coverage: 'none'
69+
ini-file: development
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Set up Python
74+
uses: LizardByte/actions/actions/setup_python@70bb8d394d1c92f6113aeec6ae9cc959a5763d15 # v2026.227.200013
75+
with:
76+
python-version: '2.7'
77+
78+
- name: Set up CalDAVTester
79+
run: |
80+
git clone --depth=1 https://github.com/apple/ccs-caldavtester.git CalDAVTester
81+
git clone --depth=1 https://github.com/apple/ccs-pycalendar.git pycalendar
82+
83+
- name: Set up Nextcloud
84+
run: |
85+
mkdir data
86+
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
87+
# disable the trashbin, so recurrent deletion of the same object works
88+
./occ config:app:set dav calendarRetentionObligation --value=0
89+
# Prepare users
90+
OC_PASS=user01 ./occ user:add --password-from-env user01
91+
OC_PASS=user02 ./occ user:add --password-from-env user02
92+
# Prepare calendars
93+
./occ dav:create-calendar user01 calendar
94+
./occ dav:create-calendar user01 shared
95+
./occ dav:create-calendar user02 calendar
96+
# Prepare address books
97+
./occ dav:create-addressbook user01 addressbook
98+
./occ dav:create-addressbook user02 addressbook
99+
100+
- name: Run Nextcloud
101+
run: |
102+
php -S localhost:8888 &
103+
104+
- name: Run CalDAVTester
105+
run: |
106+
cp "apps/dav/tests/testsuits/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/testsuits/caldavtest/serverinfo.xml"
107+
pushd CalDAVTester
108+
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/testsuits/caldavtest" -o cdt.txt \
109+
"${{ matrix.service }}/current-user-principal.xml" \
110+
"${{ matrix.service }}/sync-report.xml" \
111+
${{ matrix.endpoint == 'new' && format('{0}/sharing-{1}.xml', matrix.service, matrix.service == 'CalDAV' && 'calendars' || 'addressbooks') || ';' }}
112+
popd
113+
114+
- name: Print Nextcloud logs
115+
if: always()
116+
run: |
117+
cat data/nextcloud.log
118118
119119
caldav-integration-summary:
120120
permissions:

.github/workflows/integration-s3-primary.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ jobs:
9595

9696
- name: Wait for S3
9797
run: |
98-
sleep 10
9998
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
10099
101100
- name: Set up Nextcloud

.github/workflows/lint-stylelint.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,37 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21+
changes:
22+
runs-on: ubuntu-latest-low
23+
permissions:
24+
contents: read
25+
pull-requests: read
26+
27+
outputs:
28+
src: ${{ steps.changes.outputs.src }}
29+
30+
steps:
31+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
32+
id: changes
33+
continue-on-error: true
34+
with:
35+
filters: |
36+
src:
37+
- '.github/workflows/**'
38+
- '**/src/**'
39+
- '**/appinfo/info.xml'
40+
- 'package.json'
41+
- 'package-lock.json'
42+
- '**.css'
43+
- '**.scss'
44+
- '**.vue'
45+
2146
lint:
2247
runs-on: ubuntu-latest
2348

49+
needs: changes
50+
if: needs.changes.outputs.src != 'false'
51+
2452
name: stylelint
2553

2654
steps:
@@ -51,3 +79,18 @@ jobs:
5179

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

.github/workflows/node-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ jobs:
8383
run: |
8484
npm ci
8585
86-
# - name: Test
87-
# run: npm run test --if-present
88-
8986
- name: Test and process coverage
9087
run: npm run test:coverage
9188

.github/workflows/object-storage-s3.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ jobs:
111111
112112
- name: Wait for S3
113113
run: |
114-
sleep 10
115114
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
116115
117116
- name: PHPUnit

.github/workflows/performance.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ jobs:
1515
performance-testing:
1616
runs-on: ubuntu-latest
1717

18-
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
18+
# Skip entirely on fork PRs so the job result is 'skipped' rather than
19+
# 'failure'. The profiler action uses github.event.pull_request.head.repo.clone_url
20+
# and GITHUB_TOKEN in ways that do not work reliably from forks, and a
21+
# clean skip is far less confusing for contributors than a mid-run error.
22+
if: >-
23+
github.repository_owner != 'nextcloud-gmbh' &&
24+
github.event.pull_request.head.repo.full_name == github.repository
1925
2026
permissions:
2127
pull-requests: write
@@ -28,11 +34,6 @@ jobs:
2834
name: performance-${{ matrix.php-versions }}
2935

3036
steps:
31-
- name: Disabled on forks
32-
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
33-
run: |
34-
echo 'Can not run performance tests on forks'
35-
exit 1
3637

3738
- name: Checkout server before PR
3839
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/phpunit-object-store-primary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
105105
106106
- name: PHPUnit
107-
run: composer run test:db
107+
run: composer run test:db -- --log-junit junit.xml
108108

109109
- name: S3 logs
110110
if: always()

0 commit comments

Comments
 (0)