-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41139 from nextcloud/techdebt/noid/move-integrati…
…on-testing-to-actions Move integration tests to github actions
- Loading branch information
Showing
28 changed files
with
541 additions
and
1,370 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
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 | ||
|
||
outputs: | ||
# FIXME src: ${{ steps.changes.outputs.src}} | ||
src: 'true' | ||
|
||
steps: | ||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 | ||
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' | ||
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.2'] | ||
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
submodules: true | ||
|
||
- name: Checkout Talk app | ||
if: ${{ matrix.test-suite == 'videoverification_features' }} | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
repository: nextcloud/spreed | ||
path: apps/spreed | ||
ref: ${{ matrix.spreed-versions }} | ||
|
||
- name: Set up php ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||
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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
{ | ||
"require-dev": { | ||
"phpunit/phpunit": "^9", | ||
"dms/phpunit-arraysubset-asserts": "^0.5", | ||
"behat/behat": "~3.13.0", | ||
"guzzlehttp/guzzle": "7.8.1", | ||
"jarnaiz/behat-junit-formatter": "^1.3", | ||
"sabre/dav": "4.6.0", | ||
"symfony/event-dispatcher": "~5.3" | ||
} | ||
"config": { | ||
"platform": { | ||
"php": "8.0.2" | ||
}, | ||
"sort-packages": true | ||
}, | ||
"require-dev": { | ||
"behat/behat": "^3.14", | ||
"dms/phpunit-arraysubset-asserts": "^0.5", | ||
"guzzlehttp/guzzle": "^7.8", | ||
"phpunit/phpunit": "^9.6", | ||
"sabre/dav": "^4.6", | ||
"symfony/event-dispatcher": "^5.4" | ||
} | ||
} |
Oops, something went wrong.