s3-primary.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: S3 primary storage
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - master
  7. - stable*
  8. jobs:
  9. s3-primary-tests-minio:
  10. runs-on: ubuntu-20.04
  11. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  12. strategy:
  13. # do not stop on another job's failure
  14. fail-fast: false
  15. matrix:
  16. php-versions: ['8.0']
  17. key: ['objectstore', 'objectstore_multibucket']
  18. name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio
  19. services:
  20. minio:
  21. env:
  22. MINIO_ACCESS_KEY: minio
  23. MINIO_SECRET_KEY: minio123
  24. image: bitnami/minio:2021.12.29
  25. ports:
  26. - "9000:9000"
  27. steps:
  28. - name: Checkout server
  29. uses: actions/checkout@v2
  30. with:
  31. submodules: true
  32. - name: Set up php ${{ matrix.php-versions }}
  33. uses: shivammathur/setup-php@v2
  34. with:
  35. php-version: ${{ matrix.php-versions }}
  36. tools: phpunit:9
  37. extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
  38. env:
  39. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  40. - name: Set up Nextcloud
  41. run: |
  42. mkdir data
  43. 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
  44. ./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
  45. php -f index.php
  46. - name: Wait for S3
  47. run: |
  48. sleep 10
  49. curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
  50. - name: PHPUnit
  51. working-directory: tests
  52. run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
  53. - name: S3 logs
  54. if: always()
  55. run: |
  56. docker ps -a
  57. docker logs $(docker ps -aq)
  58. s3-primary-summary:
  59. runs-on: ubuntu-latest
  60. needs: [s3-primary-tests-minio]
  61. if: always()
  62. steps:
  63. - name: Summary status
  64. run: if ${{ needs.s3-primary-tests-minio.result != 'success' }}; then exit 1; fi