-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
37 lines (32 loc) · 825 Bytes
/
.gitlab-ci.yml
File metadata and controls
37 lines (32 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
before_script:
- export BUILD_PREFIX=buildref${CI_BUILD_REF}$(echo ${CI_BUILD_REF_NAME} | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]')yii2pages
- export COMPOSE_PROJECT_NAME=${BUILD_PREFIX}
- cd tests
stages:
- test
- report
- cleanup
test:
stage: test
script:
- set +e
- docker-compose up -d
- docker-compose run --rm phpfpm setup.sh
- docker-compose run --rm -e YII_ENV=test phpfpm codecept run; TESTS_EXIT_CODE=$?
- set -e
- mv _output /tmp/${BUILD_PREFIX}
- exit $TESTS_EXIT_CODE
report:
stage: report
script:
- mv /tmp/${BUILD_PREFIX} _output
artifacts:
paths:
- tests/_output/
when: always
cleanup:
stage: cleanup
script:
- docker-compose kill && docker-compose rm -fv
- docker-compose down --rmi local --volumes
when: always