This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
.gitlab-ci.yml
executable file
·64 lines (53 loc) · 1.73 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
#
# Yaml CI config for Gitlab See. http://docs.gitlab.com/ce/ci/yaml/README.html
#
image: git.oxfordnanolabs.local:4567/algorithm/sloika_docker:custard-16.04-latest
variables:
RUN_ENVDIR: /taiyaki_venv/python3env
RUN_ENV: ${RUN_ENVDIR}/bin/activate
TEST_ENVDIR: /taiyaki_venv/python3unittestenv
TEST_ENV: ${TEST_ENVDIR}/bin/activate
PYTEST_ARGS: -n2
stages:
- build
- test
- release
format:
stage: build
script:
- source $TEST_ENV && pip uninstall --yes flake8 && pip install 'autopep8>1.5'
- source $TEST_ENV && find bin/ misc/ taiyaki/ test/ -name \*.py | xargs -P 1 autopep8 -j 2 --diff | tee pep8_differences.txt
- if [ -s pep8_differences.txt ]; then false; fi
artifacts:
paths:
- pep8_differences.txt
expire_in: 1 week
when: on_failure
flake8:
stage: build
script:
- source $TEST_ENV && pip install flake8 &&
find bin/ misc/ taiyaki/ test/ -name \*.py |
flake8 -j 2 --show-source --statistics --tee --output-file=flake_results.txt
artifacts:
paths:
- flake_results.txt
expire_in: 1 week
when: on_failure
unit_test:
stage: test
script:
- make install envDir=${TEST_ENVDIR} && source $TEST_ENV && make unittest pyTestArgs=$PYTEST_ARGS envDir=${TEST_ENVDIR}
acceptance_test:
stage: test
script:
- make install envDir=${TEST_ENVDIR} && source $TEST_ENV && make acctest pyTestArgs=$PYTEST_ARGS envDir=${TEST_ENVDIR}
workflow:
stage: test
script:
- make install envDir=${RUN_ENVDIR} && source $RUN_ENV && make workflow envDir=${RUN_ENVDIR}
only:
- release
- master
- merge_request
- /^ci_*/