# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: MIT name: Integration sqlite on: pull_request: push: branches: - main - master - stable* permissions: contents: read concurrency: group: integration-sqlite-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: changes: runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes continue-on-error: true with: filters: | src: - '.github/workflows/**' - '3rdparty/**' - '**/*.php' - '**/lib/**' - '**/tests/**' - '**/vendor-bin/**' - 'build/integration/**' - '.php-cs-fixer.dist.php' - 'composer.json' - 'composer.lock' - 'core/shipped.json' integration-sqlite: runs-on: ubuntu-latest needs: changes if: needs.changes.outputs.src != 'false' strategy: fail-fast: false matrix: test-suite: - 'capabilities_features' - 'collaboration_features' - 'comments_features' - 'dav_features' - 'features' - 'federation_features' - '--tags ~@large files_features' - 'filesdrop_features' - 'openldap_features' - 'openldap_numerical_features' - 'ldap_features' - 'remoteapi_features' - 'setup_features' - 'sharees_features' - 'sharing_features' - 'videoverification_features' php-versions: ['8.1'] spreed-versions: ['main'] services: redis: image: ghcr.io/nextcloud/continuous-integration-redis:latest options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 ports: - 6379:6379/tcp openldap: image: ghcr.io/nextcloud/continuous-integration-openldap:openldap-7 ports: - 389:389 env: SLAPD_DOMAIN: nextcloud.ci SLAPD_ORGANIZATION: Nextcloud SLAPD_PASSWORD: admin SLAPD_ADDITIONAL_MODULES: memberof steps: - name: Checkout server uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: submodules: true - name: Checkout Talk app if: ${{ matrix.test-suite == 'videoverification_features' }} uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: repository: nextcloud/spreed path: apps/spreed ref: ${{ matrix.spreed-versions }} - name: Set up php ${{ matrix.php-versions }} uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation 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 coverage: none ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set up production dependencies run: composer i --no-dev - name: Set up behat dependencies working-directory: build/integration run: composer i - name: Set up Talk dependencies if: ${{ matrix.test-suite == 'videoverification_features' }} working-directory: apps/spreed run: composer i --no-dev - name: Set up Nextcloud run: | mkdir data ./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 ./occ config:system:set hashing_default_password --value=true --type=boolean - name: Configure caching if: ${{ contains(matrix.test-suite,'ldap') }} run: | ./occ config:system:set redis host --value=localhost ./occ config:system:set redis port --value=6379 --type=integer ./occ config:system:set redis timeout --value=0 --type=integer ./occ config:system:set memcache.local --value='\OC\Memcache\Redis' ./occ config:system:set memcache.distributed --value='\OC\Memcache\Redis' - name: Run integration working-directory: build/integration env: LDAP_HOST: localhost run: bash run.sh ${{ matrix.test-suite }} no-tail-log - name: Print logs if: always() run: | cat data/nextcloud.log docker ps -a docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done summary: permissions: contents: none runs-on: ubuntu-latest-low needs: [changes, integration-sqlite] if: always() name: integration-sqlite-summary steps: - name: Summary status run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-sqlite.result != 'success' }}; then exit 1; fi