-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (37 loc) · 1.01 KB
/
.gitlab-ci.yml
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
37
38
39
40
41
42
image: node:14
stages:
- unit-test
- acceptance-test
- analysis
cache:
paths:
- ./node_modules
unit test:
stage: unit-test
before_script:
- npm install
script:
- ./node_modules/.bin/mocha ./**/*Tests.js --reporter mocha-junit-reporter --reporter-options mochaFile=testresults_mocha.xml
artifacts:
paths:
- testresults_mocha.xml
expire_in: 1 week
reports:
junit: testresults_mocha.xml
acceptance test:
stage: acceptance-test
before_script:
- npm install
script:
- ./node_modules/.bin/cucumber-js ./GameController_ATDD --format json | ./node_modules/.bin/cucumber-junit > testresults_cucumber.xml
artifacts:
paths:
- testresults_cucumber.xml
expire_in: 1 week
reports:
junit: testresults_cucumber.xml
#sonar:
# stage: analysis
# image: sonarsource/sonar-scanner-cli
# script:
# - sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$SONAR_PROJECT_KEY -Dsonar.projectName=$SONAR_PROJECT_KEY -Dsonar.login=$SONAR_PROJECT_TOKEN