forked from labgrid-project/labgrid
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
53 lines (49 loc) · 1.35 KB
/
.gitlab-ci.yml
File metadata and controls
53 lines (49 loc) · 1.35 KB
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
stages:
- lint
- test
- doc
before_script:
- python3 -m venv .venv
- source .venv/bin/activate
- pip install .[dev]
lint:
stage: lint
dependencies: []
script:
- pip install pylint-gitlab
# call ruff twice as there is no option to print output and generate report
- ruff check || true
- ruff --output-format=gitlab --output-file=codequality-ruff.json || true
- |
pylint \
--exit-zero --load-plugins=pylint_gitlab \
--output-format=gitlab-codeclimate:codequality-pylint.json,text labgrid
artifacts:
reports:
codequality: codequality-*.json
test:
stage: test
dependencies: []
allow_failure: true
script:
# set localhost known_hosts to current localhost
- ssh-keygen -f "$HOME/.ssh/known_hosts" -R "localhost" || true
- ssh -o StrictHostKeyChecking=no localhost true
- |
pytest \
--cov-config .coveragerc --cov=labgrid \
--junit-xml=junit.xml \
--local-sshmanager --ssh-username $(whoami) \
-k "not test_docker_with_daemon and not test_remote_managedfile and not test_import_backend_eaton and not test_import_backend_poe_mib"
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
artifacts:
reports:
junit: junit.xml
pages:
stage: doc
dependencies: []
script:
- sphinx-build -b html doc public
artifacts:
paths:
- public