integration-sqlite.yml 5.3 KB

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