|
14 | 14 | APP_NAME: files_external |
15 | 15 |
|
16 | 16 | jobs: |
17 | | - s3-external-tests: |
| 17 | + s3-external-tests-minio: |
18 | 18 | runs-on: ubuntu-latest |
19 | 19 |
|
20 | 20 | strategy: |
|
23 | 23 | matrix: |
24 | 24 | php-versions: ['7.4', '8.0'] |
25 | 25 |
|
26 | | - name: php${{ matrix.php-versions }}-${{ matrix.ftpd }} |
| 26 | + name: php${{ matrix.php-versions }}-minio |
27 | 27 |
|
28 | 28 | services: |
29 | 29 | minio: |
@@ -57,17 +57,68 @@ jobs: |
57 | 57 | run: | |
58 | 58 | echo "<?php return ['run' => true,'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 |
59 | 59 | phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php |
| 60 | + phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php |
60 | 61 | - name: S3 logs |
61 | 62 | if: always() |
62 | 63 | run: | |
63 | 64 | docker ps -a |
64 | 65 | docker logs $(docker ps -aq) |
| 66 | + s3-external-tests-localstack: |
| 67 | + runs-on: ubuntu-latest |
| 68 | + |
| 69 | + strategy: |
| 70 | + # do not stop on another job's failure |
| 71 | + fail-fast: false |
| 72 | + matrix: |
| 73 | + php-versions: ['7.4', '8.0'] |
| 74 | + |
| 75 | + name: php${{ matrix.php-versions }}-localstack |
| 76 | + |
| 77 | + services: |
| 78 | + minio: |
| 79 | + env: |
| 80 | + SERVICES: s3 |
| 81 | + DEBUG: 1 |
| 82 | + image: localstack/localstack:0.12.7 |
| 83 | + ports: |
| 84 | + - "4566:4566" |
| 85 | + |
| 86 | + steps: |
| 87 | + - name: Checkout server |
| 88 | + uses: actions/checkout@v2 |
| 89 | + with: |
| 90 | + submodules: true |
| 91 | + |
| 92 | + - name: Set up php ${{ matrix.php-versions }} |
| 93 | + uses: shivammathur/setup-php@v2 |
| 94 | + with: |
| 95 | + php-version: ${{ matrix.php-versions }} |
| 96 | + tools: phpunit |
| 97 | + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd |
| 98 | + |
| 99 | + - name: Set up Nextcloud |
| 100 | + run: | |
| 101 | + mkdir data |
| 102 | + ./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 |
| 103 | + ./occ app:enable --force ${{ env.APP_NAME }} |
| 104 | + php -S localhost:8080 & |
| 105 | + - name: PHPUnit |
| 106 | + run: | |
| 107 | + 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 |
| 108 | + phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php |
| 109 | + phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php |
| 110 | + - name: S3 logs |
| 111 | + if: always() |
| 112 | + run: | |
| 113 | + docker ps -a |
| 114 | + docker logs $(docker ps -aq) |
| 115 | +
|
65 | 116 | s3-external-summary: |
66 | 117 | runs-on: ubuntu-latest |
67 | | - needs: s3-external-tests |
| 118 | + needs: [s3-external-tests-minio, s3-external-tests-localstack] |
68 | 119 |
|
69 | 120 | if: always() |
70 | 121 |
|
71 | 122 | steps: |
72 | 123 | - name: Summary status |
73 | | - run: if ${{ needs.s3-external-tests.result != 'success' }}; then exit 1; fi |
| 124 | + run: if ${{ needs.s3-external-tests-minio.result != 'success' }} || ${{ needs.s3-external-tests-localstack.result != 'success' }}; then exit 1; fi |
0 commit comments