s3-primary-integration.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: S3 primary storage integration tests
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - master
  7. - stable*
  8. jobs:
  9. s3-primary-integration-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. redis:
  21. image: redis
  22. ports:
  23. - "6379:6379"
  24. minio:
  25. env:
  26. MINIO_ACCESS_KEY: minio
  27. MINIO_SECRET_KEY: minio123
  28. image: bitnami/minio:2021.12.29
  29. ports:
  30. - "9000:9000"
  31. steps:
  32. - name: Checkout server
  33. uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  34. with:
  35. submodules: true
  36. - name: Set up php ${{ matrix.php-versions }}
  37. uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
  38. with:
  39. php-version: ${{ matrix.php-versions }}
  40. extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, redis
  41. env:
  42. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  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: Set up Nextcloud
  48. run: |
  49. mkdir data
  50. 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
  51. echo '<?php $CONFIG=["redis" => ["host" => "localhost", "port" => 6379], "memcache.local" => "\OC\Memcache\Redis", "memcache.distributed" => "\OC\Memcache\Redis"];' > config/redis.config.php
  52. ./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
  53. php -f index.php
  54. - name: Integration
  55. run: |
  56. cd build/integration
  57. bash run.sh --tags "~@failure-s3" features/webdav-related.feature
  58. - name: S3 logs
  59. if: always()
  60. run: |
  61. cat data/nextcloud.log
  62. docker ps -a
  63. docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
  64. s3-primary-integration-summary:
  65. runs-on: ubuntu-latest
  66. needs: [s3-primary-integration-tests-minio]
  67. if: always()
  68. steps:
  69. - name: Summary status
  70. run: if ${{ needs.s3-primary-integration-tests-minio.result != 'success' }}; then exit 1; fi