-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
66 lines (60 loc) · 1.61 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
---
Django Tests:
image: ${DOCKER_REGISTRY}/django:latest
tags:
- bear-gitlab-runners
before_script:
- pip install -r requirements.txt
- pip install -r requirements-test.txt
script:
- cd django
- mv core/local_settings.test.py core/local_settings.py
- mv core/local_settings_dataroot.test.py core/local_settings_dataroot.py
- coverage run manage.py test
- coverage report
- coverage xml -o coverage.xml
artifacts:
reports:
cobertura: django/coverage.xml
accessibility:
tags:
- bear-gitlab-runners
image: ${DOCKER_REGISTRY}/django:latest
before_script:
- pip install -r requirements.txt
script:
- cd django
- mv core/local_settings.test.py core/local_settings.py
- mv core/local_settings_dataroot.test.py core/local_settings_dataroot.py
- python manage.py migrate
- python manage.py runserver & sleep 5
- pa11y-ci
flake8:
tags:
- bear-gitlab-runners
image: pipelinecomponents/flake8:latest
script:
- flake8 -v .
stylelint:
tags:
- bear-gitlab-runners
image: pipelinecomponents/stylelint
script:
- stylelint .
eslint:
tags:
- bear-gitlab-runners
image: pipelinecomponents/eslint
script:
# - eslint .
- echo "Enable eslint when JS added"
tidy:
tags:
- bear-gitlab-runners
image: python:3.6
before_script:
- apt update
- apt -y install tidy
script:
# tidy exits 1 for warnings, 2 for errors, 0 for neither.
- export EX=0; for f in $(find -name *.html); do MYEX=$(tidy $f; echo $?); if [[ ${MYEX} -eq 2 ]]; then EX=$(expr ${EX} + 1); fi; done; if [[ ${EX} -ne 0 ]] ; then exit ${EX}; fi