1
0

s3-primary-integration.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. 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. redis:
  20. image: redis
  21. ports:
  22. - "6379:6379"
  23. minio:
  24. env:
  25. MINIO_ACCESS_KEY: minio
  26. MINIO_SECRET_KEY: minio123
  27. image: bitnami/minio:2021.12.29
  28. ports:
  29. - "9000:9000"
  30. steps:
  31. - name: Checkout server
  32. uses: actions/checkout@v3
  33. with:
  34. submodules: true
  35. - name: Set up php ${{ matrix.php-versions }}
  36. uses: shivammathur/setup-php@v2
  37. with:
  38. php-version: ${{ matrix.php-versions }}
  39. tools: phpunit:9
  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