forked from fepitre/qubes-builderv2-github
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
110 lines (95 loc) · 2.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
include:
- file: /common.yml
project: QubesOS/qubes-continuous-integration
stages:
- prepare
- test
variables:
DEBUG: "1"
lint:
extends: .lint
stage: test
rules:
- if: $CI_COMMIT_REF_NAME == "test"
when: always
- when: manual
variables:
DIR: $PWD
mypy:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME == "test"
when: always
- when: manual
image: fedora:latest
tags:
- vm
before_script:
- sudo dnf install -y python3-mypy python3-pip python3-pathspec git
- sudo python3 -m pip install types-PyYAML types-python-dateutil
- echo "Qubes Builder v2 branch '${CI_QUBES_BUILDER_BRANCH:-main}'"
- git clone -b "${CI_QUBES_BUILDER_BRANCH:-main}" https://gitlab.com/QubesOS/qubes-builderv2.git
script:
- PYTHONPATH="$PWD/qubes-builderv2" MYPYPATH="$PWD/qubes-builderv2" mypy --install-types --non-interactive --junit-xml mypy.xml
artifacts:
reports:
junit: mypy.xml
.pytest:
stage: test
rules:
- if: $CI_COMMIT_REF_NAME == "test"
when: always
- when: manual
tags:
- qubes
- vm
artifacts:
when: always
paths:
- results
before_script:
- sudo dnf install -y python3-pathspec python3-pytest sequoia-sq sequoia-sqv sequoia-chameleon-gnupg python3-github python3-psutil python3-pytest-asyncio
after_script:
- mkdir $CI_PROJECT_DIR/results
- cp -r ~/pytest-of-$USER/pytest-current/github-current/*.log $CI_PROJECT_DIR/results || true
- cp -r ~/pytest-of-$USER/pytest-current/github-current/builder-github-logs $CI_PROJECT_DIR/results/
test-common:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_common.py
test-action-component:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_action.py -k test_action_component
test-action-template:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_action.py -k test_action_template
test-action-iso:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_action.py -k test_action_iso
test-rpc-parse:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_rpc.py -k _parse_
test-rpc-component:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_rpc.py -k "test_rpc_04 or test_rpc_05"
test-rpc-template:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_rpc.py -k "test_rpc_06 or test_rpc_07"
test-rpc-iso:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_rpc.py -k test_rpc_08
test-command:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_command.py
test-notify:
extends: .pytest
script:
- TMPDIR=~ pytest-3 -vvv --showlocals --color=yes tests/test_notify.py