Skip to content
Snippets Groups Projects
Commit 0edb0394 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Merge branch 'feature/cache-vendor' into 'master'

Feature/cache vendor

See merge request wpdesk/gitlab-ci!45
parents 4f9f359f 4d1875fe
No related branches found
No related tags found
No related merge requests found
...@@ -135,10 +135,18 @@ churn metrics: ...@@ -135,10 +135,18 @@ churn metrics:
unit test lastest: unit test lastest:
<<: *job-test-unit-template-fast <<: *job-test-unit-template-fast
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
cache:
key: ${CI_PROJECT_NAME}-vendor-0-0
paths:
- vendor/
integration test lastest: integration test lastest:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
cache:
key: ${CI_PROJECT_NAME}-vendor-0-0
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_INTEGRATION_TESTS - $DISABLE_INTEGRATION_TESTS
...@@ -146,10 +154,18 @@ integration test lastest: ...@@ -146,10 +154,18 @@ integration test lastest:
unit test lastest coverage: unit test lastest coverage:
<<: *job-test-unit-template <<: *job-test-unit-template
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
cache:
key: ${CI_PROJECT_NAME}-vendor-0-0
paths:
- vendor/
integration test lastest coverage: integration test lastest coverage:
<<: *job-test-integration-template <<: *job-test-integration-template
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
cache:
key: ${CI_PROJECT_NAME}-vendor-0-0
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_INTEGRATION_TESTS - $DISABLE_INTEGRATION_TESTS
...@@ -157,6 +173,10 @@ integration test lastest coverage: ...@@ -157,6 +173,10 @@ integration test lastest coverage:
integration test php7-1 wc-1: integration test php7-1 wc-1:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:1-1 image: wpdesknet/phpunit-woocommerce:1-1
cache:
key: ${CI_PROJECT_NAME}-vendor-1-1
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_INTEGRATION_TESTS - $DISABLE_INTEGRATION_TESTS
...@@ -164,6 +184,10 @@ integration test php7-1 wc-1: ...@@ -164,6 +184,10 @@ integration test php7-1 wc-1:
integration test php7 wc-2: integration test php7 wc-2:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:2-2 image: wpdesknet/phpunit-woocommerce:2-2
cache:
key: ${CI_PROJECT_NAME}-vendor-2-2
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_INTEGRATION_TESTS - $DISABLE_INTEGRATION_TESTS
...@@ -171,6 +195,10 @@ integration test php7 wc-2: ...@@ -171,6 +195,10 @@ integration test php7 wc-2:
integration test php-7 wc-3: integration test php-7 wc-3:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:2-3 image: wpdesknet/phpunit-woocommerce:2-3
cache:
key: ${CI_PROJECT_NAME}-vendor-2-3
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_INTEGRATION_TESTS - $DISABLE_INTEGRATION_TESTS
...@@ -178,6 +206,10 @@ integration test php-7 wc-3: ...@@ -178,6 +206,10 @@ integration test php-7 wc-3:
integration test php5-6: integration test php5-6:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:3-0 image: wpdesknet/phpunit-woocommerce:3-0
cache:
key: ${CI_PROJECT_NAME}-vendor-3-0
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_INTEGRATION_TESTS - $DISABLE_INTEGRATION_TESTS
...@@ -185,6 +217,10 @@ integration test php5-6: ...@@ -185,6 +217,10 @@ integration test php5-6:
integration test php5-5: integration test php5-5:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:4-0 image: wpdesknet/phpunit-woocommerce:4-0
cache:
key: ${CI_PROJECT_NAME}-vendor-4-0
paths:
- vendor/
except: except:
variables: variables:
- $DISABLE_PHP_5_5 - $DISABLE_PHP_5_5
...@@ -193,11 +229,20 @@ integration test php5-5: ...@@ -193,11 +229,20 @@ integration test php5-5:
integration test current woocommerce: integration test current woocommerce:
<<: *job-test-integration-template-fast <<: *job-test-integration-template-fast
image: wpdesknet/phpunit-woocommerce:0-0 image: wpdesknet/phpunit-woocommerce:0-0
cache:
key: ${CI_PROJECT_NAME}-vendor-0-0-current
paths:
- vendor/
- .tmp/
allow_failure: true allow_failure: true
before_script: before_script:
- cd /tmp - cd ${CI_PROJECT_DIR}
- rm -rf woocommerce - mkdir -p .tmp
- git clone https://github.com/woocommerce/woocommerce.git - cd .tmp
- if [[ ! -d woocommerce ]]; then git clone https://github.com/woocommerce/woocommerce.git; fi
- cd woocommerce
- git pull
- ln -s ${CI_PROJECT_DIR}/.tmp/woocommerce /tmp/woocommerce
- cd ${CI_PROJECT_DIR} - cd ${CI_PROJECT_DIR}
except: except:
variables: variables:
...@@ -205,6 +250,10 @@ integration test current woocommerce: ...@@ -205,6 +250,10 @@ integration test current woocommerce:
acceptance test: acceptance test:
image: wpdesknet/node image: wpdesknet/node
cache:
key: ${CI_PROJECT_NAME}-vendor-acceptance
paths:
- vendor/
variables: variables:
CI_DEBUG_SERVICES: trace CI_DEBUG_SERVICES: trace
services: services:
...@@ -248,6 +297,10 @@ acceptance test: ...@@ -248,6 +297,10 @@ acceptance test:
.template: &job-functional-test .template: &job-functional-test
image: wpdesknet/katalon image: wpdesknet/katalon
cache:
key: ${CI_PROJECT_NAME}-vendor-functional
paths:
- vendor/
variables: variables:
CI_DEBUG_SERVICES: trace CI_DEBUG_SERVICES: trace
MYSQL_DATABASE: "wptest" MYSQL_DATABASE: "wptest"
...@@ -350,7 +403,7 @@ build to deploy: ...@@ -350,7 +403,7 @@ build to deploy:
- cd ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME} - cd ${CI_PROJECT_DIR}/release/${CI_PROJECT_NAME}
- composer install --no-dev --no-progress --optimize-autoloader --prefer-dist - composer install --no-dev --no-progress --optimize-autoloader --prefer-dist
- rm -rf build-coverage release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon phpunit.xml acceptance test_soap.php .gitlab - rm -rf build-coverage release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon phpunit.xml acceptance test_soap.php .gitlab
- rm -rf composer.json phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar functional tmp_artifacts - rm -rf composer.json phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar functional tmp_artifacts .tmp
- find ./vendor -type d -name "tests" -exec rm -rf {} \; 2>/dev/null || (exit 0) - find ./vendor -type d -name "tests" -exec rm -rf {} \; 2>/dev/null || (exit 0)
- find ./vendor -name "LICENSE" -delete - find ./vendor -name "LICENSE" -delete
- find ./vendor -name "README.md" -delete - find ./vendor -name "README.md" -delete
...@@ -392,6 +445,7 @@ deploy to demo: ...@@ -392,6 +445,7 @@ deploy to demo:
deploy to repository: deploy to repository:
<<: *job-deploy-template <<: *job-deploy-template
cache: cache:
key: ${CI_PROJECT_NAME}-svn
paths: paths:
- svn-repository - svn-repository
script: script:
...@@ -424,7 +478,7 @@ library: ...@@ -424,7 +478,7 @@ library:
- cd ${CI_PROJECT_DIR}/wp-desk/${CI_PROJECT_NAME} - cd ${CI_PROJECT_DIR}/wp-desk/${CI_PROJECT_NAME}
- composer install --no-dev --no-progress --optimize-autoloader --prefer-dist - composer install --no-dev --no-progress --optimize-autoloader --prefer-dist
- rm -rf build-coverage wp-desk release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon phpunit.xml acceptance test_soap.php .gitlab - rm -rf build-coverage wp-desk release tests docs .git .editorconfig .gitignore .gitlab-ci.yml apigen.neon phpunit.xml acceptance test_soap.php .gitlab
- rm -rf composer.json composer.lock phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar functional tmp_artifacts - rm -rf composer.json composer.lock phpcs.xml.dist phpunit-integration.xml phpunit-unit.xml composer.phar wp-cli.phar functional tmp_artifacts .tmp
only: only:
variables: variables:
- $IS_LIBRARY - $IS_LIBRARY
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment