You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

s3-primary.yml 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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:9
  36. extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
  37. env:
  38. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  39. - name: Set up Nextcloud
  40. run: |
  41. mkdir data
  42. 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
  43. ./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
  44. php -f index.php
  45. - name: Wait for S3
  46. run: |
  47. sleep 10
  48. curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
  49. - name: PHPUnit
  50. working-directory: tests
  51. run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
  52. - name: S3 logs
  53. if: always()
  54. run: |
  55. docker ps -a
  56. docker logs $(docker ps -aq)
  57. s3-primary-summary:
  58. runs-on: ubuntu-latest
  59. needs: [s3-primary-tests-minio]
  60. if: always()
  61. steps:
  62. - name: Summary status
  63. run: if ${{ needs.s3-primary-tests-minio.result != 'success' }}; then exit 1; fi