Select Git revision
prepare.yml
-
Bartek Jaskulski authored
Signed-off-by:
Bart Jaskulski <bjaskulski@protonmail.com>
Bartek Jaskulski authoredSigned-off-by:
Bart Jaskulski <bjaskulski@protonmail.com>
prepare.yml 2.38 KiB
prepare prefixed vendor:
image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:7.4
artifacts:
name: "vendor_prefixed"
paths:
- vendor
- vendor_prefixed
tags:
- vendor
stage: prepare-vendor
except:
variables:
- $IS_NPM_LIBRARY
interruptible: true
script:
- echo ${WPDESK_CI_VERSION}
- php --version
- composer install
prepare npm assets:
image: node:16.10
artifacts:
name: "node_assets"
paths:
- assets
cache:
key: ${CI_PROJECT_NAME}-node
paths:
- node_modules/
tags:
- vendor
rules:
- exists:
- package.json
- tests/codeception/prepare_npm.sh
- if: $IS_NPM_LIBRARY
when: never
stage: prepare-vendor
interruptible: true
script:
- mkdir -p /cache/npm-cache
- npm config set cache /cache/npm-cache --global
- if [[ -f package.json ]]; then npm install --prefer-offline --no-audit --progress=false; fi
- if [[ -f package.json ]]; then npm run prod; fi
- if [[ -f tests/codeception/prepare_npm.sh ]]; then sh tests/codeception/prepare_npm.sh; fi
prepare translations:
image: gitlab.wpdesk.dev:5050/wpdesk/docker-tests/php-box:7.4
artifacts:
name: "language"
paths:
- lang
tags:
- vendor
stage: prepare-translations-and-tests
dependencies:
- prepare prefixed vendor
except:
variables:
- $IS_LIBRARY
- $IS_NPM_LIBRARY
interruptible: true
script:
- COMPOSER_MEMORY_LIMIT=-1 composer generate-pot
- COMPOSER_MEMORY_LIMIT=-1 composer merge-translations
- COMPOSER_MEMORY_LIMIT=-1 composer generate-pot
prepare tests:
image: wpdesknet/phpunit-woocommerce:0-0
tags: