-
Notifications
You must be signed in to change notification settings - Fork 19
77 lines (65 loc) · 2.26 KB
/
phpunit.yml
File metadata and controls
77 lines (65 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: PHPUnit
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: phpunit-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
phpunit:
runs-on: ubuntu-22.04
name: PHPUnit • PHP ${{ matrix.php-version }} • ${{ matrix.server-version }}
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3']
server-version: ['master']
steps:
- name: Set app env
run: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-version }}
- name: Checkout AppAPI
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: apps/${{ env.APP_NAME }}
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2
with:
php-version: ${{ matrix.php-version }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite3, pdo_sqlite
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install app dependencies
working-directory: apps/${{ env.APP_NAME }}
run: composer i
- name: Set up Nextcloud
run: |
mkdir data
./occ maintenance:install --verbose --database=sqlite --admin-user admin --admin-pass admin
./occ app:enable --force ${{ env.APP_NAME }}
- name: Run PHPUnit
working-directory: apps/${{ env.APP_NAME }}
run: composer run test:unit
phpunit-summary:
permissions:
contents: none
runs-on: ubuntu-22.04
needs: [phpunit]
name: PHPUnit-OK
steps:
- run: echo "PHPUnit tests passed successfully"