Skip to content

Commit 3f72902

Browse files
Merge pull request #45726 from nextcloud/backport/45619/stable29
[stable29] ci: Migrate Litmus and CalDAVTester from drone to GitHub
2 parents 69a53d0 + f38c416 commit 3f72902

4 files changed

Lines changed: 237 additions & 128 deletions

File tree

.drone.yml

Lines changed: 0 additions & 127 deletions
This file was deleted.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: MIT
3+
name: DAV integration tests
4+
on:
5+
pull_request:
6+
7+
concurrency:
8+
group: integration-caldav-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
changes:
13+
runs-on: ubuntu-latest-low
14+
15+
outputs:
16+
src: ${{ steps.changes.outputs.src}}
17+
18+
steps:
19+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
20+
id: changes
21+
continue-on-error: true
22+
with:
23+
filters: |
24+
src:
25+
- '.github/workflows/**'
26+
- '3rdparty/**'
27+
- '**/*.php'
28+
- '**/lib/**'
29+
- '**/tests/**'
30+
- '**/vendor-bin/**'
31+
- 'build/integration/**'
32+
- '.php-cs-fixer.dist.php'
33+
- 'composer.json'
34+
- 'composer.lock'
35+
36+
integration-caldav:
37+
runs-on: ubuntu-latest
38+
needs: changes
39+
40+
if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh'
41+
42+
strategy:
43+
# do not stop on another job's failure
44+
fail-fast: false
45+
matrix:
46+
php-versions: ['8.3']
47+
endpoint: ['old', 'new']
48+
service: ['CalDAV', 'CardDAV']
49+
50+
name: ${{ matrix.service }} (${{ matrix.endpoint }} endpoint) php${{ matrix.php-versions }}
51+
52+
steps:
53+
- name: Checkout server
54+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
55+
with:
56+
submodules: true
57+
58+
- name: Set up php ${{ matrix.php-versions }}
59+
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
60+
with:
61+
php-version: ${{ matrix.php-versions }}
62+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
63+
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
64+
coverage: 'none'
65+
ini-file: development
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
69+
- name: Set up Python
70+
uses: LizardByte/setup-python-action@master
71+
with:
72+
python-version: '2.7'
73+
74+
- name: Set up CalDAVTester
75+
run: |
76+
git clone --depth=1 https://github.com/apple/ccs-caldavtester.git CalDAVTester
77+
git clone --depth=1 https://github.com/apple/ccs-pycalendar.git pycalendar
78+
79+
- name: Set up Nextcloud
80+
run: |
81+
mkdir data
82+
./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
83+
# disable the trashbin, so recurrent deletion of the same object works
84+
./occ config:app:set dav calendarRetentionObligation --value=0
85+
# Prepare users
86+
OC_PASS=user01 ./occ user:add --password-from-env user01
87+
OC_PASS=user02 ./occ user:add --password-from-env user02
88+
# Prepare calendars
89+
./occ dav:create-calendar user01 calendar
90+
./occ dav:create-calendar user01 shared
91+
./occ dav:create-calendar user02 calendar
92+
# Prepare address books
93+
./occ dav:create-addressbook user01 addressbook
94+
./occ dav:create-addressbook user02 addressbook
95+
96+
- name: Run Nextcloud
97+
run: |
98+
php -S localhost:8888 &
99+
100+
- name: Run CalDAVTester
101+
run: |
102+
cp "apps/dav/tests/travis/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/travis/caldavtest/serverinfo.xml"
103+
pushd CalDAVTester
104+
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/travis/caldavtest" -o cdt.txt \
105+
"${{ matrix.service }}/current-user-principal.xml" \
106+
"${{ matrix.service }}/sync-report.xml" \
107+
${{ matrix.endpoint == 'new' && format('{0}/sharing-{1}.xml', matrix.service, matrix.service == 'CalDAV' && 'calendars' || 'addressbooks') || ';' }}
108+
popd
109+
110+
- name: Print Nextcloud logs
111+
if: always()
112+
run: |
113+
cat data/nextcloud.log
114+
115+
caldav-integration-summary:
116+
permissions:
117+
contents: none
118+
runs-on: ubuntu-latest-low
119+
needs: [changes, integration-caldav]
120+
121+
if: always()
122+
123+
steps:
124+
- name: Summary status
125+
run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-caldav.result != 'success' }}; then exit 1; fi
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
2+
# SPDX-License-Identifier: MIT
3+
name: Litmus integration tests
4+
on:
5+
pull_request:
6+
7+
concurrency:
8+
group: integration-litmus-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
changes:
13+
runs-on: ubuntu-latest-low
14+
15+
outputs:
16+
src: ${{ steps.changes.outputs.src}}
17+
18+
steps:
19+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
20+
id: changes
21+
continue-on-error: true
22+
with:
23+
filters: |
24+
src:
25+
- '.github/workflows/**'
26+
- '3rdparty/**'
27+
- '**/*.php'
28+
- '**/lib/**'
29+
- '**/tests/**'
30+
- '**/vendor-bin/**'
31+
- 'build/integration/**'
32+
- '.php-cs-fixer.dist.php'
33+
- 'composer.json'
34+
- 'composer.lock'
35+
36+
integration-litmus:
37+
runs-on: ubuntu-latest
38+
needs: changes
39+
40+
if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh'
41+
42+
strategy:
43+
# do not stop on another job's failure
44+
fail-fast: false
45+
matrix:
46+
php-versions: ['8.3']
47+
endpoint: ['webdav', 'dav']
48+
49+
name: Litmus WebDAV ${{ matrix.endpoint }}
50+
51+
steps:
52+
- name: Checkout server
53+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
54+
with:
55+
submodules: true
56+
57+
- name: Set up php ${{ matrix.php-versions }}
58+
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
59+
with:
60+
php-version: ${{ matrix.php-versions }}
61+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
62+
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
63+
coverage: 'none'
64+
ini-file: development
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Set up Nextcloud
69+
run: |
70+
mkdir data
71+
./occ maintenance:install \
72+
--verbose \
73+
--database=sqlite \
74+
--database-name=nextcloud \
75+
--database-user=root \
76+
--database-pass=rootpassword \
77+
--admin-user admin \
78+
--admin-pass admin
79+
./occ config:system:set trusted_domains 2 --value=host.docker.internal:8080
80+
81+
- name: Run Nextcloud
82+
run: |
83+
php -S 0.0.0.0:8080 &
84+
85+
- name: Run Litmus test
86+
run: |
87+
docker run \
88+
--rm \
89+
--add-host=host.docker.internal:host-gateway \
90+
ghcr.io/nextcloud/continuous-integration-litmus-php8.3:latest \
91+
bash -c '\
92+
cd /tmp/litmus/litmus-0.13;
93+
make URL=http://host.docker.internal:8080/remote.php/${{ matrix.endpoint }}${{ matrix.endpoint == 'dav' && '/files/admin' || ''}} CREDS="admin admin" TESTS="basic copymove props largefile" check;
94+
status=$?;
95+
cat debug.log;
96+
exit $status;'
97+
98+
- name: Print Nextcloud logs
99+
if: always()
100+
run: cat data/nextcloud.log
101+
102+
integration-litmus-summary:
103+
permissions:
104+
contents: none
105+
runs-on: ubuntu-latest-low
106+
needs: [changes, integration-litmus]
107+
108+
if: always()
109+
110+
steps:
111+
- name: Summary status
112+
run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-litmus.result != 'success' }}; then exit 1; fi

build/files-checker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
'.',
2424
'..',
2525
'.devcontainer',
26-
'.drone.yml',
2726
'.editorconfig',
2827
'.eslintignore',
2928
'.eslintrc.js',

0 commit comments

Comments
 (0)