Skip to content

Commit 69d1ece

Browse files
authored
Merge pull request #712 from nextcloud/tebt/noid/split-ci
Splitting CI images into seperate ones
2 parents 64ec7c9 + 7d7f161 commit 69d1ece

File tree

303 files changed

+5162
-2454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+5162
-2454
lines changed

.drone.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/integration.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Integration tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '.github/workflows/integration.yml'
7+
- 'appinfo/**'
8+
- 'lib/**'
9+
- 'tests/**'
10+
- 'composer.*'
11+
push:
12+
branches:
13+
- main
14+
- master
15+
- stable*
16+
17+
env:
18+
APP_NAME: user_saml
19+
LDAP_SUFFIX: dc=idptestbed
20+
LDAP_CR_NAME: directory
21+
22+
jobs:
23+
integration:
24+
runs-on: ubuntu-22.04
25+
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
php-versions: [ "8.0" ]
30+
databases: [ "sqlite" ]
31+
server-versions: [ "master" ]
32+
33+
34+
name: Integration php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
35+
36+
#container: ubuntu
37+
38+
services:
39+
directory:
40+
image: ghcr.io/nextcloud/continuous-integration-user_saml-dirsrv:latest
41+
ports:
42+
- 389:3389/tcp
43+
options:
44+
--name directory
45+
sso:
46+
image: ghcr.io/nextcloud/continuous-integration-user_saml_shibboleth-idp:latest
47+
ports:
48+
- 4443:8443/tcp
49+
- 9090:8080/tcp
50+
51+
steps:
52+
#- name: Install utilities
53+
#run: |
54+
#sudo apt update -y
55+
#sudo apt install -y git docker.io curl
56+
57+
#- name: Test sso container
58+
#run: curl 'https://localhost:4443/idp/profile/SAML2/Redirect/SSO?SAMLRequest=nZJbj9MwEIXf%2BytWeW%2BduOnNaiuVLZdKpa2awgMvq6kzoZYc23gcWP49TgK7gMQ%2BMJYseezzac6RlwS1dmLThJs545cGKQzuYj3W2pDoLldJ442wQIqEgRpJBCmKzfu94KNUOG%2BDlVYnf8leVgER%2BqCs6WW77So5Hl7vj293hwd%2BzasK8mwOc15Opnk5wSpf5LOx5ItJCrzKJsBheu2lH9FT5KySiE0GPY2owZ2hACbEfsrHw3QxzLJLNhV8Jvj4Uy%2FdRrPKQOjktxAcCcYyPhulcWUiz%2FMxU6Vj0WKlNLJ2es7OWCqPMrCiOPac088IXilTKvP5ZefX%2FhGJd5fLaXg6FpcesvmVyL011NToC%2FRflcQP530%2FXJxNWwn6ZimIeTpPWSTh48jdHAPniDUR8NBGz7oNJCXrDr1sz6JLxa%2F%2FB1VjgBICLNnvpGe2E4foc7c9Wa3k967f1hvrawj%2FjiOLIbcdVQ6r7qloDDmUqlJYJk%2BYjdb2271HCLhKgm8wuWPrQT%2FLnz93%2FQM%3D&RelayState=http%3A%2F%2Flocalhost%3A8080%2Findex.php%2Fapps%2Fuser_saml%2Fsaml%2Flogin&SigAlg=http%3A%2F%2Fwww.w3.org%2F2001%2F04%2Fxmldsig-more%23rsa-sha256&Signature=ZsTglbAjFrUgyBsUcm1cMOyHV7rzXTr9YM4E38fXiS1mXT5HNfy%2BR4ho6DCYXAuCmcYQwzJ8EiMAFYAHdUQZt8EkCHcV10qvL2hKhkMMxkvRL2%2FYPSdrvit8VfSpwgbOYrZOAu4re5JDU%2F5CWJ2tZpRYfokA0gldS%2BFuodqETGqRthZB9ge7oTmQUUbH7RxlmU8UCiwfWc0RtUNC4P%2FrsVwDS9bUgAzrqOqs7KOoCnrJPn08Fdz2RmoxJapdmBt9BAHxeDce5RPo%2BIoI5c8JDIPcUEuhImWJFXJnoQRIkJLYIIfgoqoj%2Bgtc6Np1%2BOeHJBSzlATZqiOWUIInfarjBg%3D%3D' || sleep 20
59+
60+
- name: Checkout server
61+
uses: actions/checkout@v3
62+
with:
63+
repository: nextcloud/server
64+
ref: ${{ matrix.server-versions }}
65+
submodules: true
66+
67+
- name: Checkout app
68+
uses: actions/checkout@v3
69+
with:
70+
path: apps/${{ env.APP_NAME }}
71+
72+
- name: Set up php ${{ matrix.php-versions }}
73+
uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f # v2
74+
with:
75+
php-version: ${{ matrix.php-versions }}
76+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
77+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
78+
coverage: none
79+
ini-file: production
80+
ini-values: disabled_functions=
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- name: DEBUG diagnose PHP modules
85+
run: |
86+
echo 'extension=pcntl.so' | sudo tee /etc/php/${{ matrix.php-versions }}/fpm/conf.d/10-pcntl.ini
87+
php -m
88+
89+
- name: Set up dependencies
90+
working-directory: apps/${{ env.APP_NAME }}
91+
run: composer i --no-dev
92+
93+
- name: Set up Nextcloud
94+
run: |
95+
if [ "${{ matrix.databases }}" = "mysql" ]; then
96+
export DB_PORT=4444
97+
elif [ "${{ matrix.databases }}" = "pgsql" ]; then
98+
export DB_PORT=4445
99+
fi
100+
mkdir data
101+
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
102+
./occ app:enable --force ${{ env.APP_NAME }}
103+
PHP_CLI_SERVER_WORKERS=4 php -S localhost:8080 &
104+
105+
- name: Run behat
106+
working-directory: apps/${{ env.APP_NAME }}/tests/integration
107+
run: |
108+
composer install
109+
./vendor/bin/behat --colors
110+
111+
- name: Dump nextcloud.log
112+
if: always()
113+
run: cat data/nextcloud.log

lib/UserBackend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
namespace OCA\User_SAML;
2323

2424
use OCP\Authentication\IApacheBackend;
25+
use OCP\EventDispatcher\GenericEvent;
2526
use OCP\EventDispatcher\IEventDispatcher;
2627
use OCP\Files\NotPermittedException;
2728
use OCP\IConfig;
@@ -37,7 +38,6 @@
3738
use OCP\Server;
3839
use OCP\User\Events\UserChangedEvent;
3940
use OCP\UserInterface;
40-
use Symfony\Component\EventDispatcher\GenericEvent;
4141

4242
class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
4343
/** @var IConfig */

tests/integration/composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
2+
"config": {
3+
"platform": {
4+
"php": "8.0"
5+
}
6+
},
27
"require": {
3-
"php": ">=7.3"
8+
"php": ">=8.0"
49
},
510
"require-dev": {
611
"behat/behat": "^3.3",

0 commit comments

Comments
 (0)