Skip to content

Commit 76e3a11

Browse files
committed
fixup! test
1 parent cecdde3 commit 76e3a11

32 files changed

Lines changed: 281 additions & 7 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: S3 External storage
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- stable*
7+
paths:
8+
- 'apps/files_external/**'
9+
pull_request:
10+
paths:
11+
- 'apps/files_external/**'
12+
13+
env:
14+
APP_NAME: files_external
15+
16+
jobs:
17+
s3-external-tests-minio:
18+
runs-on: ubuntu-latest
19+
20+
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
21+
22+
strategy:
23+
# do not stop on another job's failure
24+
fail-fast: false
25+
matrix:
26+
php-versions: ['8.0', '8.1']
27+
28+
name: php${{ matrix.php-versions }}-minio
29+
30+
services:
31+
minio:
32+
env:
33+
MINIO_ACCESS_KEY: minio
34+
MINIO_SECRET_KEY: minio123
35+
image: bitnami/minio:2021.10.6
36+
ports:
37+
- "9000:9000"
38+
39+
steps:
40+
- name: Checkout server
41+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
42+
with:
43+
submodules: true
44+
45+
- name: Set up php ${{ matrix.php-versions }}
46+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
47+
with:
48+
php-version: ${{ matrix.php-versions }}
49+
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Set up Nextcloud
54+
run: |
55+
composer install
56+
mkdir data
57+
./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 password
58+
./occ app:enable --force ${{ env.APP_NAME }}
59+
php -S localhost:8080 &
60+
- name: PHPUnit
61+
run: |
62+
echo "<?php return ['run' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => 'minio','secret' => 'minio123', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php
63+
composer run test:files_external apps/files_external/tests/Storage/Amazons3Test.php
64+
composer run test:files_external apps/files_external/tests/Storage/VersionedAmazonS3Test.php
65+
- name: S3 logs
66+
if: always()
67+
run: |
68+
docker ps -a
69+
docker logs $(docker ps -aq)
70+
s3-external-tests-localstack:
71+
runs-on: ubuntu-latest
72+
73+
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
74+
75+
strategy:
76+
# do not stop on another job's failure
77+
fail-fast: false
78+
matrix:
79+
php-versions: ['8.0', '8.1']
80+
81+
name: php${{ matrix.php-versions }}-localstack
82+
83+
services:
84+
minio:
85+
env:
86+
SERVICES: s3
87+
DEBUG: 1
88+
image: localstack/localstack:0.12.7
89+
ports:
90+
- "4566:4566"
91+
92+
steps:
93+
- name: Checkout server
94+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
95+
with:
96+
submodules: true
97+
98+
- name: Set up php ${{ matrix.php-versions }}
99+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
100+
with:
101+
php-version: ${{ matrix.php-versions }}
102+
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
106+
- name: Set up Nextcloud
107+
run: |
108+
composer install
109+
mkdir data
110+
./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 password
111+
./occ app:enable --force ${{ env.APP_NAME }}
112+
php -S localhost:8080 &
113+
- name: PHPUnit
114+
run: |
115+
echo "<?php return ['run' => true,'hostname' => 'localhost','key' => 'ignored','secret' => 'ignored', 'bucket' => 'bucket', 'port' => 4566, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php
116+
composer run test:files_external apps/files_external/tests/Storage/Amazons3Test.php
117+
composer run test:files_external apps/files_external/tests/Storage/VersionedAmazonS3Test.php
118+
- name: S3 logs
119+
if: always()
120+
run: |
121+
docker ps -a
122+
docker logs $(docker ps -aq)
123+
124+
s3-external-summary:
125+
runs-on: ubuntu-latest
126+
needs: [s3-external-tests-minio, s3-external-tests-localstack]
127+
128+
if: always()
129+
130+
steps:
131+
- name: Summary status
132+
run: if ${{ needs.s3-external-tests-minio.result != 'success' }} || ${{ needs.s3-external-tests-localstack.result != 'success' }}; then exit 1; fi
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: SFTP External storage
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- stable*
7+
paths:
8+
- 'apps/files_external/**'
9+
pull_request:
10+
paths:
11+
- 'apps/files_external/**'
12+
13+
env:
14+
APP_NAME: files_external
15+
16+
jobs:
17+
sftp-tests:
18+
runs-on: ubuntu-latest
19+
20+
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
21+
22+
strategy:
23+
# do not stop on another job's failure
24+
fail-fast: false
25+
matrix:
26+
php-versions: ['8.0']
27+
sftpd: ['openssh']
28+
29+
name: php${{ matrix.php-versions }}-${{ matrix.sftpd }}
30+
31+
steps:
32+
- name: Checkout server
33+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
34+
with:
35+
submodules: true
36+
37+
- name: Set up sftpd
38+
run: |
39+
sudo mkdir /tmp/sftp
40+
sudo chown -R 0777 /tmp/sftp
41+
if [[ "${{ matrix.sftpd }}" == 'openssh' ]]; then docker run -p 2222:22 --name sftp -d -v /tmp/sftp:/home/test atmoz/sftp "test:test:::data"; fi
42+
- name: Set up php ${{ matrix.php-versions }}
43+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
44+
with:
45+
php-version: ${{ matrix.php-versions }}
46+
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Set up Nextcloud
51+
run: |
52+
composer install
53+
mkdir data
54+
./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 password
55+
./occ app:enable --force ${{ env.APP_NAME }}
56+
php -S localhost:8080 &
57+
- name: PHPUnit
58+
run: |
59+
echo "<?php return ['run' => true, 'host' => 'localhost:2222','user' => 'test','password' => 'test', 'root' => 'data'];" > apps/${{ env.APP_NAME }}/tests/config.sftp.php
60+
composer run test:files_external apps/files_external/tests/Storage/SftpTest.php
61+
- name: sftpd logs
62+
if: always()
63+
run: |
64+
ls -l /tmp/sftp
65+
docker logs sftp
66+
67+
sftp-summary:
68+
runs-on: ubuntu-latest
69+
needs: sftp-tests
70+
71+
if: always()
72+
73+
steps:
74+
- name: Summary status
75+
run: if ${{ needs.sftp-tests.result != 'success' }}; then exit 1; fi
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Samba Kerberos External storage
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- stable*
7+
paths:
8+
- 'apps/files_external/**'
9+
- '.github/workflows/smb-kerberos.yml'
10+
pull_request:
11+
paths:
12+
- 'apps/files_external/**'
13+
- '.github/workflows/smb-kerberos.yml'
14+
15+
jobs:
16+
smb-kerberos-tests:
17+
runs-on: ubuntu-latest
18+
19+
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
20+
21+
name: smb-kerberos-sso
22+
23+
steps:
24+
- name: Checkout server
25+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
26+
with:
27+
submodules: true
28+
- name: Checkout user_saml
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
30+
with:
31+
repository: nextcloud/user_saml
32+
path: apps/user_saml
33+
- name: Pull images
34+
run: |
35+
docker pull ghcr.io/icewind1991/samba-krb-test-dc
36+
docker pull ghcr.io/icewind1991/samba-krb-test-apache
37+
docker pull ghcr.io/icewind1991/samba-krb-test-client
38+
docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
39+
docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
40+
docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
41+
- name: Setup AD-DC
42+
run: |
43+
DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
44+
sleep 1
45+
apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD
46+
echo "DC_IP=$DC_IP" >> $GITHUB_ENV
47+
- name: Set up Nextcloud
48+
run: |
49+
apps/files_external/tests/sso-setup/setup-sso-nc.sh
50+
- name: Test SSO
51+
run: |
52+
apps/files_external/tests/sso-setup/test-sso-smb.sh ${{ env.DC_IP }}
53+
- name: Show logs
54+
if: failure()
55+
run: |
56+
FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
57+
echo "$FILEPATH:"
58+
docker exec --user 33 apache cat $FILEPATH

0 commit comments

Comments
 (0)