-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
114 lines (106 loc) · 3.01 KB
/
.gitlab-ci.yml
File metadata and controls
114 lines (106 loc) · 3.01 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
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
111
112
113
114
# ---------------------------------------------------------------------------- #
# Base Setup #
# ---------------------------------------------------------------------------- #
stages:
- test
- bulild
- deploy
- release
before_script:
- ./devops/python/setup_poetry.sh
cache:
paths:
- .cache/pypoetry
# ---------------------------------------------------------------------------- #
# Test #
# ---------------------------------------------------------------------------- #
package:test:py313:
stage: test
image: python:3.13
script:
- ./devops/python/setup_dependencies.sh
- ./devops/python/execute_tests.sh
- ./devops/python/upload_coverage.sh
cache:
key: ${CI_JOB_NAME}
paths:
- .tox
artifacts:
when: always
reports:
junit: report.xml
# ---------------------------------------------------------------------------- #
# Package #
# ---------------------------------------------------------------------------- #
package:bulild:py313:
stage: bulild
image: python:3.13
script:
- ./devops/python/build_package.sh
artifacts:
paths:
- dist/
expire_in: 1 week
dependencies:
- package:test:py313
only:
- /v(\d+)\.(\d+)\.(\d+)/
docs:bulild:py313:
stage: bulild
image: python:3.13
script:
- ./devops/python/setup_dependencies.sh
- ./devops/python/build_docs_with_jupyterbook.sh
artifacts:
paths:
- _build/
expire_in: 1 week
dependencies:
- package:test:py313
only:
- master
# ---------------------------------------------------------------------------- #
# Release #
# ---------------------------------------------------------------------------- #
package:deploy:py313:
stage: deploy
image: python:3.13
script:
- ./devops/python/setup_pypi_credentials.sh
- ./devops/python/publish_package_to_pypi.sh
dependencies:
- package:bulild:py313
only:
- /v(\d+)\.(\d+)\.(\d+)/
package:release:gitlab:py313:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created
before_script:
- echo ""
script:
- echo "Creating Release $CI_COMMIT_TAG"
release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
tag_name: "$CI_COMMIT_TAG"
description: "$CI_COMMIT_TAG"
dependencies:
- package:bulild:py313
# Gitlab requires the use of the name "pages" for the job in order to have
# Gitlab Pages working correctly.
# docs:deploy:py313:
pages:
stage: deploy
image: busybox:latest
before_script:
- echo "Doesn't need any setup"
script:
- ./devops/python/publish_docs_to_gitlab_pages.sh
artifacts:
paths:
- public/
expire_in: 1 week
dependencies:
- docs:bulild:py313
only:
- master