Skip to content

Commit 21b93d6

Browse files
committed
Use random port for minio
The jobs run within the same network hence only one instance of minio can use port 9000. Signed-off-by: Daniel Kesselberg <[email protected]>
1 parent 45da5b0 commit 21b93d6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/s3-primary.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
MINIO_SECRET_KEY: minio123
2727
image: bitnami/minio:2021.10.6
2828
ports:
29-
- "9000:9000"
29+
- 9000/tcp
30+
- 9001/tcp
3031

3132
steps:
3233
- name: Checkout server
@@ -44,16 +45,16 @@ jobs:
4445
- name: Set up Nextcloud
4546
run: |
4647
mkdir data
47-
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
48+
echo '<?php $CONFIG=["${{ matrix.key }}" => ["class" => "OC\Files\ObjectStore\S3", "arguments" => ["bucket" => "nextcloud", "autocreate" => true, "key" => "minio", "secret" => "minio123", "hostname" => "localhost", "port" => ${{ job.services.minio.ports['9000'] }}, "use_ssl" => false, "use_path_style" => true, "uploadPartSize" => 52428800]]];' > config/config.php
4849
./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
4950
php -f index.php
5051
5152
- name: Wait for S3
5253
run: |
5354
sleep 10
54-
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
55+
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:${{ job.services.minio.ports['9000'] }}/minio/health/ready
5556
sleep 10
56-
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
57+
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:${{ job.services.minio.ports['9000'] }}/minio/health/ready
5758
5859
- name: PHPUnit
5960
working-directory: tests

0 commit comments

Comments
 (0)