-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (54 loc) · 1.09 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
---
include:
- 'https://gitlab.esss.lu.se/ics-infrastructure/gitlab-ci-yml/raw/master/PreCommit.gitlab-ci.yml'
variables:
SONAR_HOST_URL: https://sonarqube.esss.lu.se
SONARQUBE_TOKEN: xxxxx
.runner_tags: &runner_tags
tags:
- docker
stages:
- check
- testpy37
- testpy38
- analyse
test 1/2:
<<: *runner_tags
stage: testpy38
image: python:3.8
cache:
key: build-cache
paths:
- .tox/
before_script:
- python -m pip install --upgrade pip
- pip install tox
script:
- tox -e py38
artifacts:
untracked: true
paths:
- unittest.xml
- coverage.xml
expire_in: 24 hour
test 2/2:
<<: *runner_tags
stage: testpy37
image: python:3.7
before_script:
- python -m pip install --upgrade pip
- pip install tox
script:
- tox -e py37
run-sonar-scanner:
tags:
- docker
stage: analyse
image: sonarsource/sonar-scanner-cli:latest
cache:
key: build-cache
paths:
- .tox/
before_script: []
script:
- sonar-scanner -Dsonar.login=$SONARQUBE_TOKEN -Dsonar.projectVersion=$CI_COMMIT_REF_NAME