1
0

s3-primary-integration.yml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. name: S3 primary storage integration tests
  2. on:
  3. pull_request:
  4. paths:
  5. - '.github/workflows/**'
  6. - '3rdparty/**'
  7. - '**/*.php'
  8. - '**/lib/**'
  9. - '**/tests/**'
  10. - '**/vendor-bin/**'
  11. - '.php-cs-fixer.dist.php'
  12. - 'composer.json'
  13. - 'composer.lock'
  14. concurrency:
  15. group: s3-external-integration-${{ github.head_ref || github.run_id }}
  16. cancel-in-progress: true
  17. jobs:
  18. s3-primary-integration-tests-minio:
  19. runs-on: ubuntu-20.04
  20. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  21. strategy:
  22. # do not stop on another job's failure
  23. fail-fast: false
  24. matrix:
  25. php-versions: ['8.0']
  26. key: ['objectstore', 'objectstore_multibucket']
  27. name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio
  28. services:
  29. redis:
  30. image: redis
  31. ports:
  32. - "6379:6379"
  33. minio:
  34. env:
  35. MINIO_ACCESS_KEY: minio
  36. MINIO_SECRET_KEY: minio123
  37. image: bitnami/minio:2021.12.29
  38. ports:
  39. - "9000:9000"
  40. steps:
  41. - name: Checkout server
  42. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
  43. with:
  44. submodules: true
  45. - name: Set up php ${{ matrix.php-versions }}
  46. uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
  47. with:
  48. php-version: ${{ matrix.php-versions }}
  49. extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, redis
  50. env:
  51. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  52. - name: Wait for S3
  53. run: |
  54. sleep 10
  55. curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
  56. - name: Set up Nextcloud
  57. run: |
  58. mkdir data
  59. 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
  60. echo '<?php $CONFIG=["redis" => ["host" => "localhost", "port" => 6379], "memcache.local" => "\OC\Memcache\Redis", "memcache.distributed" => "\OC\Memcache\Redis"];' > config/redis.config.php
  61. ./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
  62. php -f index.php
  63. - name: Integration
  64. run: |
  65. cd build/integration
  66. bash run.sh --tags "~@failure-s3" features/webdav-related.feature
  67. - name: S3 logs
  68. if: always()
  69. run: |
  70. cat data/nextcloud.log
  71. docker ps -a
  72. docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
  73. s3-primary-integration-summary:
  74. runs-on: ubuntu-latest
  75. needs: [s3-primary-integration-tests-minio]
  76. if: always()
  77. steps:
  78. - name: Summary status
  79. run: if ${{ needs.s3-primary-integration-tests-minio.result != 'success' }}; then exit 1; fi