integration-sqlite.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. integration-sqlite:
  39. runs-on: ubuntu-latest
  40. needs: changes
  41. if: needs.changes.outputs.src != 'false'
  42. strategy:
  43. fail-fast: false
  44. matrix:
  45. test-suite:
  46. - 'capabilities_features'
  47. - 'collaboration_features'
  48. - 'comments_features'
  49. - 'dav_features'
  50. - 'features'
  51. - 'federation_features'
  52. - '--tags ~@large files_features'
  53. - 'filesdrop_features'
  54. - 'openldap_features'
  55. - 'openldap_numerical_features'
  56. - 'ldap_features'
  57. - 'remoteapi_features'
  58. - 'setup_features'
  59. - 'sharees_features'
  60. - 'sharing_features'
  61. - 'videoverification_features'
  62. php-versions: ['8.2']
  63. spreed-versions: ['main']
  64. services:
  65. redis:
  66. image: ghcr.io/nextcloud/continuous-integration-redis:latest
  67. options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
  68. ports:
  69. - 6379:6379/tcp
  70. openldap:
  71. image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7
  72. ports:
  73. - 389:389
  74. env:
  75. SLAPD_DOMAIN: nextcloud.ci
  76. SLAPD_ORGANIZATION: Nextcloud
  77. SLAPD_PASSWORD: admin
  78. SLAPD_ADDITIONAL_MODULES: memberof
  79. steps:
  80. - name: Checkout server
  81. uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  82. with:
  83. submodules: true
  84. - name: Checkout Talk app
  85. if: ${{ matrix.test-suite == 'videoverification_features' }}
  86. uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  87. with:
  88. repository: nextcloud/spreed
  89. path: apps/spreed
  90. ref: ${{ matrix.spreed-versions }}
  91. - name: Set up php ${{ matrix.php-versions }}
  92. uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
  93. with:
  94. php-version: ${{ matrix.php-versions }}
  95. # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
  96. 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
  97. coverage: none
  98. ini-file: development
  99. env:
  100. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  101. - name: Set up production dependencies
  102. run: composer i --no-dev
  103. - name: Set up behat dependencies
  104. working-directory: build/integration
  105. run: composer i
  106. - name: Set up Talk dependencies
  107. if: ${{ matrix.test-suite == 'videoverification_features' }}
  108. working-directory: apps/spreed
  109. run: composer i --no-dev
  110. - name: Set up Nextcloud
  111. run: |
  112. mkdir data
  113. ./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
  114. ./occ config:system:set hashing_default_password --value=true --type=boolean
  115. - name: Configure caching
  116. if: ${{ contains(matrix.test-suite,'ldap') }}
  117. run: |
  118. ./occ config:system:set redis host --value=localhost
  119. ./occ config:system:set redis port --value=6379 --type=integer
  120. ./occ config:system:set redis timeout --value=0 --type=integer
  121. ./occ config:system:set memcache.local --value='\OC\Memcache\Redis'
  122. ./occ config:system:set memcache.distributed --value='\OC\Memcache\Redis'
  123. - name: Run integration
  124. working-directory: build/integration
  125. env:
  126. LDAP_HOST: localhost
  127. run: bash run.sh ${{ matrix.test-suite }} no-tail-log
  128. - name: Print logs
  129. if: always()
  130. run: |
  131. cat data/nextcloud.log
  132. docker ps -a
  133. docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
  134. summary:
  135. permissions:
  136. contents: none
  137. runs-on: ubuntu-latest-low
  138. needs: [changes, integration-sqlite]
  139. if: always()
  140. name: integration-sqlite-summary
  141. steps:
  142. - name: Summary status
  143. run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-sqlite.result != 'success' }}; then exit 1; fi