-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
63 lines (53 loc) · 1.31 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
image: alpine:edge
# The mr-settings check needs to run in a MR specific context. With this block,
# the whole pipeline runs in that context for MRs. Otherwise we would have two
# pipelines for MRs.
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_BRANCH == 'master'
- if: $CI_COMMIT_BRANCH == 'wip'
before_script:
- ".ci/note.sh"
- "echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories"
- "adduser -D build"
stages:
- lint
- test
codespell:
stage: lint
script:
- ".ci/codespell.sh"
pytest:
stage: test
script:
- "apk -q add git"
- "su build -c 'git config --global user.email ci@ci'"
- "su build -c 'git config --global user.name CI'"
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- ".ci/pytest.sh"
ruff:
stage: lint
script:
- ".ci/ruff.sh"
shellcheck:
stage: lint
script:
- ".ci/shellcheck.sh"
vermin:
stage: lint
script:
- ".ci/vermin.sh"
mr-settings:
stage: lint
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
before_script:
- "apk -q add python3"
- "wget -q 'https://gitlab.com/postmarketOS/ci-common/-/raw/master/check_mr_settings.py'"
script:
- "python3 ./check_mr_settings.py"
mypy:
stage: lint
script:
- ".ci/mypy.sh"