-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
53 lines (47 loc) · 1.07 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
image: python:3.5
before_script:
- apt update -qy
- apt-get install -y expect
- pip install --upgrade pip
- make setup
- make test_setup
stages:
- test
- post-test
style_app:
type: test
script:
- make style
test:
type: test
cache:
paths:
- tests/test_data/songs
script:
- | # Download if needed
if ! [[ -d tests/test_data/songs ]]; then
wget https://attach.libremail.nl/songs.tar.gz
tar xfvz songs.tar.gz
mv songs/ tests/test_data/
fi
mkdir -p coverage
touch coverage/out
rm coverage/out
touch coverage/out
unbuffer pytest -v --cov-config=.coveragerc --cov-report term-missing --cov=dj_feet --runslow tests/ | awk '{print >>(/^TOTAL/?"coverage/out":"/dev/stdout")}'
artifacts:
expire_in: 31d
paths:
- coverage/
coverage:
type: post-test
script:
- cat coverage/out
- cat coverage/out | sed 's/^.* \([^ ]*%\).*/\1/g'
artifacts:
name: coverage
expire_in: 31d
paths:
- coverage/index.html
- coverage/assets/
#old ^TOTAL.*\s+(\d+\%)$