Skip to content

Commit 2a68d28

Browse files
committed
ci: Migrated litmus checks to GitHub
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 6858bb5 commit 2a68d28

2 files changed

Lines changed: 112 additions & 127 deletions

File tree

.drone.yml

Lines changed: 0 additions & 127 deletions
This file was deleted.
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

0 commit comments

Comments
 (0)