Skip to content

Commit dc74d99

Browse files
committed
Added .gitlab-ci.yml
1 parent 96dedf5 commit dc74d99

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.gitlab-ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This file is a template, and might need editing before it works on your project.
2+
# To contribute improvements to CI/CD templates, please follow the Development guide at:
3+
# https://docs.gitlab.com/ee/development/cicd/templates.html
4+
# This specific template is located at:
5+
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
6+
7+
# Official language image. Look for the different tagged releases at:
8+
# https://hub.docker.com/r/library/python/tags/
9+
image: python:latest
10+
11+
# Change pip's cache directory to be inside the project directory since we can
12+
# only cache local items.
13+
variables:
14+
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
15+
16+
# https://pip.pypa.io/en/stable/topics/caching/
17+
cache:
18+
paths:
19+
- .cache/pip
20+
21+
before_script:
22+
- python --version ; pip --version # For debugging
23+
- pip install virtualenv
24+
- virtualenv venv
25+
- source venv/bin/activate
26+
27+
test:
28+
script:
29+
- pip install ruff tox # you can also use tox
30+
- pip install --editable ".[test]"
31+
- tox -e py,ruff
32+
33+
run:
34+
script:
35+
- pip install .
36+
# run the command here
37+
artifacts:
38+
paths:
39+
- build/*
40+
41+
pages:
42+
script:
43+
- pip install sphinx sphinx-rtd-theme
44+
- cd doc
45+
- make html
46+
- mv build/html/ ../public/
47+
artifacts:
48+
paths:
49+
- public
50+
rules:
51+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
52+
53+
deploy:
54+
stage: deploy
55+
script: echo "Define your deployment script!"
56+
environment: production
57+

0 commit comments

Comments
 (0)