Last active
May 1, 2018 17:14
-
-
Save GWillmann/38febd394522eb926150a93691d9200b to your computer and use it in GitHub Desktop.
.gitlab-ci.yml file to run php and js tests on GitLab
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
image: kinoba/docker-custom-php:latest | |
services: | |
- mysql:5.7 | |
variables: | |
DOCKER_DRIVER: overlay2 | |
APP_ENV: test | |
... | |
before_script: | |
- php --ini | |
- node --version | |
# Install the project's php dependencies | |
- composer install | |
# Install the project's node dependencies | |
- yarn config set cache-folder .yarn | |
- yarn install | |
- yarn run encore dev | |
- php bin/console doctrine:schema:update --force --env=test | |
- php bin/console doctrine:fixtures:load --env=test | |
cache: | |
paths: | |
- vendor/ | |
- node_modules/ | |
- .yarn | |
test:app: | |
script: | |
- phpunit --configuration phpunit.xml.dist | |
test:app_js: | |
script: | |
- Xvfb :10 -ac & | |
- export DISPLAY=:10 | |
- sleep 3 | |
- php bin/console server:start | |
- yarn test | |
- php bin/console server:stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment