forked from vividus-framework/vividus-sample-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
67 lines (60 loc) · 1.72 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
image: openjdk:17.0.2-slim
stages:
- build
- test
variables:
OUT: .out
HISTORY: $OUT/$CI_PROJECT_NAME/history
GIT_SUBMODULE_STRATEGY: recursive
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- export OUTPUT_ROOT=`pwd`/$OUT
- export GRADLE_USER_HOME=$OUTPUT_ROOT/.gradle
cache:
key: one-key-to-rule-them-all
paths:
- $OUT/.gradle/wrapper
- $OUT/.gradle/caches
build:
stage: build
script:
- ./gradlew build
api:
stage: test
script:
- ./gradlew debugStories -Pvividus.configuration.suites=rest_api -Pvividus.allure.history-directory=$HISTORY/rest-api-tests
cache:
key: "$CI_JOB_NAME-$CI_JOB_STAGE"
paths:
- $HISTORY
when: always
artifacts:
when: always
name: REST API tests report
paths:
- $OUT/$CI_PROJECT_NAME/reports/allure/
expire_in: 1 week
e2e:chrome:
stage: test
services:
- selenium/standalone-chrome
script:
- |
./gradlew debugStories -Pvividus.configuration.suites=web_app \
-Pvividus.configuration.profiles=web/headless/chrome \
-Pvividus.selenium.grid.enabled=true \
-Pvividus.selenium.grid.url=http://selenium-standalone-chrome:4444/wd/hub \
-Pvividus.selenium.grid.capabilities.platformName=linux \
-Pvividus.selenium.grid.capabilities.browserName=chrome \
-Pvividus.allure.history-directory=$HISTORY/web-app-tests
cache:
key: "$CI_JOB_NAME-$CI_JOB_STAGE"
paths:
- $HISTORY
when: always
artifacts:
when: always
name: Web application tests report
paths:
- $OUT/$CI_PROJECT_NAME/reports/allure/
expire_in: 1 week