integration-sqlite.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. name: Integration sqlite
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - main
  7. - master
  8. - stable*
  9. permissions:
  10. contents: read
  11. concurrency:
  12. group: integration-sqlite-${{ github.head_ref || github.run_id }}
  13. cancel-in-progress: true
  14. jobs:
  15. changes:
  16. runs-on: ubuntu-latest
  17. outputs:
  18. # FIXME src: ${{ steps.changes.outputs.src}}
  19. src: 'true'
  20. steps:
  21. - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
  22. id: changes
  23. continue-on-error: true
  24. with:
  25. filters: |
  26. src:
  27. - '.github/workflows/**'
  28. - '3rdparty/**'
  29. - '**/*.php'
  30. - '**/lib/**'
  31. - '**/tests/**'
  32. - '**/vendor-bin/**'
  33. - 'build/integration/**'
  34. - '.php-cs-fixer.dist.php'
  35. - 'composer.json'
  36. - 'composer.lock'
  37. integration-sqlite:
  38. runs-on: ubuntu-latest
  39. needs: changes
  40. if: needs.changes.outputs.src != 'false'
  41. strategy:
  42. fail-fast: false
  43. matrix:
  44. test-suite:
  45. - 'capabilities_features'
  46. - 'collaboration_features'
  47. - 'comments_features'
  48. - 'dav_features'
  49. - 'features'
  50. - 'federation_features'
  51. - '--tags ~@large files_features'
  52. - 'filesdrop_features'
  53. - 'openldap_features'
  54. - 'openldap_numerical_features'
  55. - 'ldap_features'
  56. - 'remoteapi_features'
  57. - 'setup_features'
  58. - 'sharees_features'
  59. - 'sharing_features'
  60. - 'videoverification_features'
  61. php-versions: ['8.2']
  62. spreed-versions: ['main']
  63. services:
  64. redis:
  65. image: ghcr.io/nextcloud/continuous-integration-redis:latest
  66. options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
  67. ports:
  68. - 6379:6379/tcp
  69. openldap:
  70. image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7
  71. ports:
  72. - 389:389
  73. env:
  74. SLAPD_DOMAIN: nextcloud.ci
  75. SLAPD_ORGANIZATION: Nextcloud
  76. SLAPD_PASSWORD: admin
  77. SLAPD_ADDITIONAL_MODULES: memberof
  78. steps:
  79. - name: Checkout server
  80. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  81. with:
  82. submodules: true
  83. - name: Checkout Talk app
  84. if: ${{ matrix.test-suite == 'videoverification_features' }}
  85. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  86. with:
  87. repository: nextcloud/spreed
  88. path: apps/spreed
  89. ref: ${{ matrix.spreed-versions }}
  90. - name: Set up php ${{ matrix.php-versions }}
  91. uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
  92. with:
  93. php-version: ${{ matrix.php-versions }}
  94. # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
  95. extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, imagick, intl, json, ldap, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
  96. coverage: none
  97. ini-file: development
  98. env:
  99. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  100. - name: Set up production dependencies
  101. run: composer i --no-dev
  102. - name: Set up behat dependencies
  103. working-directory: build/integration
  104. run: composer i
  105. - name: Set up Talk dependencies
  106. if: ${{ matrix.test-suite == 'videoverification_features' }}
  107. working-directory: apps/spreed
  108. run: composer i --no-dev
  109. - name: Set up Nextcloud
  110. run: |
  111. mkdir data
  112. ./occ maintenance:install --verbose ${{ contains(matrix.test-suite,'ldap') && '--data-dir=/dev/shm/nc_int' || '' }} --database=sqlite --database-name=nextcloud --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
  113. ./occ config:system:set hashing_default_password --value=true --type=boolean
  114. - name: Configure caching
  115. if: ${{ contains(matrix.test-suite,'ldap') }}
  116. run: |
  117. ./occ config:system:set redis host --value=localhost
  118. ./occ config:system:set redis port --value=6379 --type=integer
  119. ./occ config:system:set redis timeout --value=0 --type=integer
  120. ./occ config:system:set memcache.local --value='\OC\Memcache\Redis'
  121. ./occ config:system:set memcache.distributed --value='\OC\Memcache\Redis'
  122. - name: Run integration
  123. working-directory: build/integration
  124. env:
  125. LDAP_HOST: localhost
  126. run: bash run.sh ${{ matrix.test-suite }} no-tail-log
  127. - name: Print logs
  128. if: always()
  129. run: |
  130. cat data/nextcloud.log
  131. docker ps -a
  132. docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
  133. summary:
  134. permissions:
  135. contents: none
  136. runs-on: ubuntu-latest
  137. needs: [changes, integration-sqlite]
  138. if: always()
  139. name: integration-sqlite-summary
  140. steps:
  141. - name: Summary status
  142. run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-sqlite.result != 'success' }}; then exit 1; fi