11name : S3 primary storage integration tests
22on :
33 pull_request :
4- push :
5- branches :
6- - master
7- - stable*
4+
5+ concurrency :
6+ group : integration-s3-primary-${{ github.head_ref || github.run_id }}
7+ cancel-in-progress : true
88
99jobs :
10- s3-primary-integration-tests-minio :
11- runs-on : ubuntu-20.04
10+ changes :
11+ runs-on : ubuntu-latest-low
1212
13- if : ${{ github.repository_owner != 'nextcloud-gmbh' }}
13+ outputs :
14+ src : ${{ steps.changes.outputs.src}}
15+
16+ steps :
17+ - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
18+ id : changes
19+ continue-on-error : true
20+ with :
21+ filters : |
22+ src:
23+ - '.github/workflows/**'
24+ - '3rdparty/**'
25+ - '**/*.php'
26+ - '**/lib/**'
27+ - '**/tests/**'
28+ - '**/vendor-bin/**'
29+ - 'build/integration/**'
30+ - '.php-cs-fixer.dist.php'
31+ - 'composer.json'
32+ - 'composer.lock'
33+
34+ integration-s3-primary :
35+ runs-on : ubuntu-latest
36+ needs : changes
37+
38+ if : needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh'
1439
1540 strategy :
1641 # do not stop on another job's failure
1742 fail-fast : false
1843 matrix :
19- php-versions : [' 8.0' ]
20- key : [' objectstore', ' objectstore_multibucket' ]
44+ php-versions : [" 8.0" ]
45+ key : [" objectstore", " objectstore_multibucket" ]
2146
2247 name : php${{ matrix.php-versions }}-${{ matrix.key }}-minio
2348
2449 services :
2550 redis :
26- image : redis
51+ image : ghcr.io/nextcloud/continuous-integration-redis:latest
52+ options : --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
2753 ports :
28- - " 6379:6379"
54+ - 6379:6379/tcp
2955 minio :
56+ image : bitnami/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 # v2025.4.22
3057 env :
31- MINIO_ACCESS_KEY : minio
32- MINIO_SECRET_KEY : minio123
33- image : bitnami/minio:2021.12.29
58+ MINIO_ROOT_USER : nextcloud
59+ MINIO_ROOT_PASSWORD : bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ=
60+ MINIO_DEFAULT_BUCKETS : nextcloud
3461 ports :
3562 - " 9000:9000"
3663
3764 steps :
3865 - name : Checkout server
39- uses : actions/checkout@v3
66+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4067 with :
4168 submodules : true
4269
4370 - name : Set up php ${{ matrix.php-versions }}
44- uses : shivammathur/setup-php@v2
71+ uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
4572 with :
4673 php-version : ${{ matrix.php-versions }}
47- tools : phpunit:9
48- extensions : mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, redis
74+ # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
75+ 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
76+ coverage : " none"
77+ ini-file : development
4978 env :
5079 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5180
5786 - name : Set up Nextcloud
5887 run : |
5988 mkdir data
60- echo '<?php $CONFIG=["${{ matrix.key }}" => ["class" => "OC\Files\ObjectStore\S3", "arguments" => ["bucket" => "nextcloud", "autocreate" => true, "key" => "minio ", "secret" => "minio123 ", "hostname" => "localhost", "port" => 9000, "use_ssl" => false, "use_path_style" => true, "uploadPartSize" => 52428800]]];' > config/config.php
89+ echo '<?php $CONFIG=["${{ matrix.key }}" => ["class" => "OC\Files\ObjectStore\S3", "arguments" => ["bucket" => "nextcloud", "autocreate" => true, "key" => "nextcloud ", "secret" => "bWluaW8tc2VjcmV0LWtleS1uZXh0Y2xvdWQ= ", "hostname" => "localhost", "port" => 9000, "use_ssl" => false, "use_path_style" => true, "uploadPartSize" => 52428800]]];' > config/config.php
6190 echo '<?php $CONFIG=["redis" => ["host" => "localhost", "port" => 6379], "memcache.local" => "\OC\Memcache\Redis", "memcache.distributed" => "\OC\Memcache\Redis"];' > config/redis.config.php
6291 ./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 admin
6392 php -f index.php
@@ -74,13 +103,14 @@ jobs:
74103 docker ps -a
75104 docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
76105
77-
78106 s3-primary-integration-summary :
79- runs-on : ubuntu-latest
80- needs : [s3-primary-integration-tests-minio]
107+ permissions :
108+ contents : none
109+ runs-on : ubuntu-latest-low
110+ needs : [changes, integration-s3-primary]
81111
82112 if : always()
83113
84114 steps :
85115 - name : Summary status
86- run : if ${{ needs.s3-primary- integration-tests-minio .result != 'success' }}; then exit 1; fi
116+ run : if ${{ needs.changes.outputs.src != 'false' && needs. integration-s3-primary .result != 'success' }}; then exit 1; fi
0 commit comments