integration-sqlite.yml 5.5 KB

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