-
Notifications
You must be signed in to change notification settings - Fork 13
96 lines (82 loc) 路 2.54 KB
/
Copy pathintegration.yml
File metadata and controls
96 lines (82 loc) 路 2.54 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Integration tests
on:
pull_request:
paths:
- .github/workflows/integration.yml
- appinfo/**
- composer.*
- lib/**
- templates/**
- tests/**
push:
branches:
- main
- stable*
- test
paths:
- .github/workflows/integration.yml
- appinfo/**
- composer.*
- lib/**
- templates/**
- tests/**
permissions:
contents: read
env:
APP_NAME: integration_github
jobs:
integration:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Pair each server branch with a PHP version it actually supports. A plain
# cross-product put PHP 8.2 against master, which requires 8.3 or newer, so
# `occ maintenance:install` aborted before any test ran.
include:
- php-versions: '8.2'
databases: 'sqlite'
server-versions: 'stable33'
- php-versions: '8.3'
databases: 'sqlite'
server-versions: 'master'
name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
steps:
- name: Checkout server
uses: actions/checkout@v7.0.1
with:
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
submodules: true
- name: Checkout app
uses: actions/checkout@v7.0.1
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit:11.x
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, gd, zip
- name: Set up PHPUnit
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: PHPUnit integration
working-directory: apps/${{ env.APP_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: composer run test:integration
- name: Upload Nextcloud log on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: nextcloud-log-${{ matrix.server-versions }}
path: data/nextcloud.log
if-no-files-found: ignore