-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
95 lines (85 loc) · 2.96 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
include:
- project: "waldur/waldur-pipelines"
file: "/templates/stages.yml"
- project: "waldur/waldur-pipelines"
file: "/templates/test/check-merge-compatibility.yml"
- project: "waldur/waldur-pipelines"
file: "/templates/test/lint-md-files.yml"
- project: "waldur/waldur-pipelines"
file: "/templates/release/python-module-release.yml"
.Run tests template:
stage: test
interruptible: true
rules:
# Skip tests if specified
- if: '$SKIP_TESTS == "true" || $SKIP_TESTS == "yes"'
when: never
- if: '$CI_COMMIT_BRANCH == "develop"'
- if: '$CI_COMMIT_BRANCH == "master"'
# If tagged release
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
# If event is related to a created merge request
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- pip install -e .[tests]
- python setup.py test
.Run linters template:
stage: test
interruptible: true
rules:
# Skip tests if specified
- if: '$SKIP_TESTS == "true" || $SKIP_TESTS == "yes"'
when: never
- if: '$CI_COMMIT_BRANCH == "develop"'
- if: '$CI_COMMIT_BRANCH == "master"'
# If tagged release
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
# If event is related to a created merge request
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- pip install pre-commit
- pre-commit run --all
Run python v3.8 linters:
image: "registry.hpc.ut.ee/mirror/library/python:3.8"
extends: .Run linters template
before_script:
- |
echo 'default_language_version:' >> .pre-commit-config.yaml
echo ' python: python3.8' >> .pre-commit-config.yaml
- cat .pre-commit-config.yaml
Run python v3.9 linters:
image: "registry.hpc.ut.ee/mirror/library/python:3.9"
extends: .Run linters template
before_script:
- |
echo 'default_language_version:' >> .pre-commit-config.yaml
echo ' python: python3.9' >> .pre-commit-config.yaml
- cat .pre-commit-config.yaml
Run python v3.10 linters:
image: "registry.hpc.ut.ee/mirror/library/python:3.10"
extends: .Run linters template
before_script:
- |
echo 'default_language_version:' >> .pre-commit-config.yaml
echo ' python: python3.10' >> .pre-commit-config.yaml
- cat .pre-commit-config.yaml
Run python v3.11 linters:
image: "registry.hpc.ut.ee/mirror/library/python:3.11"
extends: .Run linters template
before_script:
- |
echo 'default_language_version:' >> .pre-commit-config.yaml
echo ' python: python3.11' >> .pre-commit-config.yaml
- cat .pre-commit-config.yaml
Run python v3.8 tests:
image: "registry.hpc.ut.ee/mirror/library/python:3.8"
extends: .Run tests template
Run python v3.9 tests:
image: "registry.hpc.ut.ee/mirror/library/python:3.9"
extends: .Run tests template
Run python v3.10 tests:
image: "registry.hpc.ut.ee/mirror/library/python:3.10"
extends: .Run tests template
Run python v3.11 tests:
image: "registry.hpc.ut.ee/mirror/library/python:3.11"
extends: .Run tests template