Merge pull request #16909 from nextcloud/backport/16879/stable16

[stable16] Only run integration tests when PHP was modified
This commit is contained in:
Roeland Jago Douma 2019-08-28 20:33:11 +02:00 committed by GitHub
commit c4bac0131e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View File

@ -755,6 +755,7 @@ steps:
- name: integration-capabilities_features - name: integration-capabilities_features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh capabilities_features/capabilities.feature - ./run.sh capabilities_features/capabilities.feature
@ -779,6 +780,7 @@ steps:
- name: integration-federation_features - name: integration-federation_features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin - ./occ maintenance:install --admin-pass=admin
- cd build/integration - cd build/integration
- ./run.sh federation_features/federated.feature - ./run.sh federation_features/federated.feature
@ -803,6 +805,7 @@ steps:
- name: integration-auth - name: integration-auth
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/auth.feature - ./run.sh features/auth.feature
@ -827,6 +830,7 @@ steps:
- name: integration-maintenance-mode - name: integration-maintenance-mode
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/maintenance-mode.feature - ./run.sh features/maintenance-mode.feature
@ -851,6 +855,7 @@ steps:
- name: integration-ratelimiting - name: integration-ratelimiting
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- ./occ config:system:set redis host --value=cache - ./occ config:system:set redis host --value=cache
- ./occ config:system:set redis port --value=6379 --type=integer - ./occ config:system:set redis port --value=6379 --type=integer
@ -885,6 +890,7 @@ steps:
- name: integration-carddav - name: integration-carddav
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/carddav.feature - ./run.sh features/carddav.feature
@ -909,6 +915,7 @@ steps:
- name: integration-dav-v2 - name: integration-dav-v2
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/dav-v2.feature - ./run.sh features/dav-v2.feature
@ -933,6 +940,7 @@ steps:
- name: integration-ocs-v1 - name: integration-ocs-v1
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/ocs-v1.feature - ./run.sh features/ocs-v1.feature
@ -957,6 +965,7 @@ steps:
- name: integration-sharing-v1 - name: integration-sharing-v1
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/sharing-v1.feature - ./run.sh features/sharing-v1.feature
@ -981,6 +990,7 @@ steps:
- name: integration-sharing-v1-part2 - name: integration-sharing-v1-part2
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/sharing-v1-part2.feature - ./run.sh features/sharing-v1-part2.feature
@ -1005,6 +1015,7 @@ steps:
- name: integration-sharing-v1-part3 - name: integration-sharing-v1-part3
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/sharing-v1-part3.feature - ./run.sh features/sharing-v1-part3.feature
@ -1029,6 +1040,7 @@ steps:
- name: integration-checksums-v1 - name: integration-checksums-v1
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/checksums.feature - ./run.sh features/checksums.feature
@ -1053,6 +1065,7 @@ steps:
- name: integration-external-storage - name: integration-external-storage
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/external-storage.feature - ./run.sh features/external-storage.feature
@ -1077,6 +1090,7 @@ steps:
- name: integration-provisioning-v1 - name: integration-provisioning-v1
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/provisioning-v1.feature - ./run.sh features/provisioning-v1.feature
@ -1101,6 +1115,7 @@ steps:
- name: integration-tags - name: integration-tags
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/tags.feature - ./run.sh features/tags.feature
@ -1125,6 +1140,7 @@ steps:
- name: integration-caldav - name: integration-caldav
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/caldav.feature - ./run.sh features/caldav.feature
@ -1149,6 +1165,7 @@ steps:
- name: integration-comments - name: integration-comments
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/comments.feature - ./run.sh features/comments.feature
@ -1173,6 +1190,7 @@ steps:
- name: integration-comments-search - name: integration-comments-search
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/comments-search.feature - ./run.sh features/comments-search.feature
@ -1197,6 +1215,7 @@ steps:
- name: integration-favorites - name: integration-favorites
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/favorites.feature - ./run.sh features/favorites.feature
@ -1221,6 +1240,7 @@ steps:
- name: integration-provisioning-v2 - name: integration-provisioning-v2
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/provisioning-v2.feature - ./run.sh features/provisioning-v2.feature
@ -1245,6 +1265,7 @@ steps:
- name: integration-webdav-related - name: integration-webdav-related
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/webdav-related.feature - ./run.sh features/webdav-related.feature
@ -1269,6 +1290,7 @@ steps:
- name: integration-sharees-features - name: integration-sharees-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh sharees_features/sharees.feature - ./run.sh sharees_features/sharees.feature
@ -1293,6 +1315,7 @@ steps:
- name: integration-sharees-v2-features - name: integration-sharees-v2-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh sharees_features/sharees_provisioningapiv2.feature - ./run.sh sharees_features/sharees_provisioningapiv2.feature
@ -1317,6 +1340,7 @@ steps:
- name: integration-setup-features - name: integration-setup-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- cd build/integration - cd build/integration
- ./run.sh setup_features/setup.feature - ./run.sh setup_features/setup.feature
@ -1340,6 +1364,7 @@ steps:
- name: integration-filesdrop-features - name: integration-filesdrop-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh filesdrop_features/filesdrop.feature - ./run.sh filesdrop_features/filesdrop.feature
@ -1364,6 +1389,7 @@ steps:
- name: integration-transfer-ownership-features - name: integration-transfer-ownership-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/transfer-ownership.feature - ./run.sh features/transfer-ownership.feature
@ -1388,6 +1414,7 @@ steps:
- name: integration-ldap-features - name: integration-ldap-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh ldap_features/ldap-ocs.feature - ./run.sh ldap_features/ldap-ocs.feature
@ -1412,6 +1439,7 @@ steps:
- name: integration-ldap-openldap-features - name: integration-ldap-openldap-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- ./occ config:system:set redis host --value=cache - ./occ config:system:set redis host --value=cache
- ./occ config:system:set redis port --value=6379 --type=integer - ./occ config:system:set redis port --value=6379 --type=integer
@ -1452,6 +1480,7 @@ steps:
- name: integration-ldap-openldap-uid-features - name: integration-ldap-openldap-uid-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- ./occ config:system:set redis host --value=cache - ./occ config:system:set redis host --value=cache
- ./occ config:system:set redis port --value=6379 --type=integer - ./occ config:system:set redis port --value=6379 --type=integer
@ -1492,6 +1521,7 @@ steps:
- name: integration-ldap-openldap-numerical-id-features - name: integration-ldap-openldap-numerical-id-features
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- ./occ config:system:set redis host --value=cache - ./occ config:system:set redis host --value=cache
- ./occ config:system:set redis port --value=6379 --type=integer - ./occ config:system:set redis port --value=6379 --type=integer
@ -1532,6 +1562,7 @@ steps:
- name: integration-trashbin - name: integration-trashbin
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh features/trashbin.feature - ./run.sh features/trashbin.feature
@ -1556,6 +1587,7 @@ steps:
- name: integration-remote-api - name: integration-remote-api
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh remoteapi_features/remote.feature - ./run.sh remoteapi_features/remote.feature
@ -1580,6 +1612,7 @@ steps:
- name: integration-download - name: integration-download
image: nextcloudci/integration-php7.1:1 image: nextcloudci/integration-php7.1:1
commands: commands:
- bash tests/drone-run-integration-tests.sh || exit 0
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int - ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
- cd build/integration - cd build/integration
- ./run.sh --tags ~@large features/download.feature - ./run.sh --tags ~@large features/download.feature

View File

@ -0,0 +1,15 @@
#!/bin/bash
echo "========================="
echo "= List of changed files ="
echo "========================="
git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA
echo "========================="
[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | wc -l) -eq 0 ]] && echo "No files are modified => merge commit" && exit 0
[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c ".php$") -gt 0 ]] && echo "PHP files are modified" && exit 0
[[ $(git diff --name-only origin/$DRONE_TARGET_BRANCH...$DRONE_COMMIT_SHA | grep -c "^build/integration/") -gt 0 ]] && echo "Integration test files are modified" && exit 0
exit 1