s3-primary.yml 2.2 KB

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