|
| 1 | +name: S3 primary storage integration tests |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - stable* |
| 8 | + |
| 9 | +jobs: |
| 10 | + s3-primary-integration-tests-minio: |
| 11 | + runs-on: ubuntu-20.04 |
| 12 | + |
| 13 | + strategy: |
| 14 | + # do not stop on another job's failure |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + php-versions: ['8.0'] |
| 18 | + key: ['objectstore', 'objectstore_multibucket'] |
| 19 | + |
| 20 | + name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio |
| 21 | + |
| 22 | + services: |
| 23 | + redis: |
| 24 | + image: redis |
| 25 | + ports: |
| 26 | + - "6379:6379" |
| 27 | + minio: |
| 28 | + env: |
| 29 | + MINIO_ACCESS_KEY: minio |
| 30 | + MINIO_SECRET_KEY: minio123 |
| 31 | + image: bitnami/minio:2021.12.29 |
| 32 | + ports: |
| 33 | + - "9000:9000" |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout server |
| 37 | + uses: actions/checkout@v3 |
| 38 | + with: |
| 39 | + submodules: true |
| 40 | + |
| 41 | + - name: Set up php ${{ matrix.php-versions }} |
| 42 | + uses: shivammathur/setup-php@v2 |
| 43 | + with: |
| 44 | + php-version: ${{ matrix.php-versions }} |
| 45 | + tools: phpunit:9 |
| 46 | + extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, redis |
| 47 | + env: |
| 48 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 49 | + |
| 50 | + - name: Wait for S3 |
| 51 | + run: | |
| 52 | + sleep 10 |
| 53 | + curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready |
| 54 | +
|
| 55 | + - name: Set up Nextcloud |
| 56 | + run: | |
| 57 | + mkdir data |
| 58 | + 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 |
| 59 | + echo '<?php $CONFIG=["redis" => ["host" => "localhost", "port" => 6379], "memcache.local" => "\OC\Memcache\Redis", "memcache.distributed" => "\OC\Memcache\Redis"];' > config/redis.config.php |
| 60 | + ./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 |
| 61 | + php -f index.php |
| 62 | +
|
| 63 | + - name: Integration |
| 64 | + run: | |
| 65 | + cd build/integration |
| 66 | + bash run.sh --tags "~@failure-s3" features/webdav-related.feature |
| 67 | +
|
| 68 | + - name: S3 logs |
| 69 | + if: always() |
| 70 | + run: | |
| 71 | + cat data/nextcloud.log |
| 72 | + docker ps -a |
| 73 | + docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done |
| 74 | +
|
| 75 | +
|
| 76 | + s3-primary-integration-summary: |
| 77 | + runs-on: ubuntu-latest |
| 78 | + needs: [s3-primary-integration-tests-minio] |
| 79 | + |
| 80 | + if: always() |
| 81 | + |
| 82 | + steps: |
| 83 | + - name: Summary status |
| 84 | + run: if ${{ needs.s3-primary-integration-tests-minio.result != 'success' }}; then exit 1; fi |
0 commit comments