s3-primary.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  30. with:
  31. submodules: true
  32. - name: Set up php ${{ matrix.php-versions }}
  33. uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
  34. with:
  35. php-version: ${{ matrix.php-versions }}
  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. composer install
  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. run: composer run test:db
  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