Skip to content

Commit c195761

Browse files
Merge pull request #56820 from nextcloud/artonge/fix/stable27_ci
[stable27] chore(workflow): Update some staled workflows using versions of stable28
2 parents dbcd598 + b679eeb commit c195761

File tree

3 files changed

+88
-32
lines changed

3 files changed

+88
-32
lines changed

.github/workflows/oci.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: PHPUnit oci
22

3-
on: pull_request
3+
on:
4+
pull_request:
45

56
permissions:
67
contents: read
@@ -10,8 +11,31 @@ concurrency:
1011
cancel-in-progress: true
1112

1213
jobs:
14+
changes:
15+
runs-on: ubuntu-latest-low
16+
17+
outputs:
18+
src: ${{ steps.changes.outputs.src}}
19+
20+
steps:
21+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
22+
id: changes
23+
continue-on-error: true
24+
with:
25+
filters: |
26+
src:
27+
- '.github/workflows/**'
28+
- '3rdparty/**'
29+
- '**/lib/**'
30+
- '**/tests/**'
31+
- '**/vendor-bin/**'
32+
- '.php-cs-fixer.dist.php'
33+
- 'composer.json'
34+
- 'composer.lock'
35+
- '**.php'
36+
1337
phpunit-oci:
14-
runs-on: ubuntu-20.04
38+
runs-on: ubuntu-latest
1539

1640
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
1741

@@ -42,12 +66,12 @@ jobs:
4266
4367
steps:
4468
- name: Checkout server
45-
uses: actions/checkout@v3
69+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4670
with:
4771
submodules: true
4872

4973
- name: Set up php ${{ matrix.php-versions }}
50-
uses: shivammathur/setup-php@v2
74+
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
5175
with:
5276
php-version: ${{ matrix.php-versions }}
5377
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pcntl, pdo_sqlite, posix, sqlite, xml, zip
@@ -59,6 +83,7 @@ jobs:
5983

6084
- name: Set up Nextcloud
6185
run: |
86+
composer install
6287
mkdir data
6388
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=1521 --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
6489
php -f index.php
@@ -74,13 +99,13 @@ jobs:
7499
summary:
75100
permissions:
76101
contents: none
77-
runs-on: ubuntu-latest
78-
needs: phpunit-oci
102+
runs-on: ubuntu-latest-low
103+
needs: [changes, phpunit-oci]
79104

80105
if: always()
81106

82107
name: phpunit-oci-summary
83108

84109
steps:
85110
- name: Summary status
86-
run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi
111+
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-oci.result != 'success' }}; then exit 1; fi
Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,80 @@
11
name: S3 primary storage integration tests
22
on:
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

99
jobs:
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

@@ -57,7 +86,7 @@ jobs:
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

.github/workflows/s3-primary.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
s3-primary-tests-minio:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212

1313
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
1414

@@ -23,6 +23,7 @@ jobs:
2323

2424
services:
2525
minio:
26+
image: bitnami/minio@sha256:50cec18ac4184af4671a78aedd5554942c8ae105d51a465fa82037949046da01 # v2025.4.22
2627
env:
2728
MINIO_ACCESS_KEY: minio
2829
MINIO_SECRET_KEY: minio123
@@ -68,7 +69,7 @@ jobs:
6869
6970
7071
s3-primary-summary:
71-
runs-on: ubuntu-latest
72+
runs-on: ubuntu-latest-low
7273
needs: [s3-primary-tests-minio]
7374

7475
if: always()

0 commit comments

Comments
 (0)