-
Notifications
You must be signed in to change notification settings - Fork 65
/
.gitlab-ci.yml
56 lines (54 loc) · 1.48 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
test:python2.7:
image: python:2.7
services:
- redis:3.2
before_script:
- export PIP_CACHE_DIR="/opt/cache/pip"
- pip install -r requirements.txt
- pip install pytest-cov
- python -m fomalhaut.tests.load_config gitlab_ci
- sleep 2
- python -m fomalhaut.runserver --gitlab_ci=true &
- sleep 2
- python -m fomalhaut.tests.api_server &
- sleep 2
script:
- python -m unittest discover -s fomalhaut -p "*_test.py"
# 测试覆盖率
- py.test --cov-config .coveragerc --cov=fomalhaut
test:python3.4:
image: python:3.4
services:
- redis:3.2
before_script:
- export PIP_CACHE_DIR="/opt/cache/pip"
- pip install -r requirements.txt
- pip install pytest-cov
- python -m fomalhaut.tests.load_config gitlab_ci
- sleep 2
- python -m fomalhaut.runserver --gitlab_ci=true &
- sleep 2
- python -m fomalhaut.tests.api_server &
- sleep 2
script:
- python -m unittest discover -s fomalhaut -p "*_test.py"
# 测试覆盖率
- py.test --cov-config .coveragerc --cov=fomalhaut
test:pypy:
image: pypy:2
services:
- redis:3.2
before_script:
- export PIP_CACHE_DIR="/opt/cache/pip"
- pip install -r requirements.txt
- pip install pytest-cov
- pypy -m fomalhaut.tests.load_config gitlab_ci
- sleep 2
- pypy -m fomalhaut.runserver --gitlab_ci=true &
- sleep 2
- pypy -m fomalhaut.tests.api_server &
- sleep 2
script:
- pypy -m unittest discover -s fomalhaut -p "test_*.py"
# 测试覆盖率
- py.test --cov-config .coveragerc --cov=fomalhaut