s3-primary-integration.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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@v3
  34. with:
  35. submodules: true
  36. - name: Set up php ${{ matrix.php-versions }}
  37. uses: shivammathur/setup-php@v2
  38. with:
  39. php-version: ${{ matrix.php-versions }}
  40. tools: phpunit:9
  41. extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, redis
  42. env:
  43. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  44. - name: Wait for S3
  45. run: |
  46. sleep 10
  47. curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
  48. - name: Set up Nextcloud
  49. run: |
  50. mkdir data
  51. 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
  52. echo '<?php $CONFIG=["redis" => ["host" => "localhost", "port" => 6379], "memcache.local" => "\OC\Memcache\Redis", "memcache.distributed" => "\OC\Memcache\Redis"];' > config/redis.config.php
  53. ./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
  54. php -f index.php
  55. - name: Integration
  56. run: |
  57. cd build/integration
  58. bash run.sh --tags "~@failure-s3" features/webdav-related.feature
  59. - name: S3 logs
  60. if: always()
  61. run: |
  62. cat data/nextcloud.log
  63. docker ps -a
  64. docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
  65. s3-primary-integration-summary:
  66. runs-on: ubuntu-latest
  67. needs: [s3-primary-integration-tests-minio]
  68. if: always()
  69. steps:
  70. - name: Summary status
  71. run: if ${{ needs.s3-primary-integration-tests-minio.result != 'success' }}; then exit 1; fi