-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
59 lines (52 loc) · 1.18 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
# -*- compile-command: "gitlab-runner exec docker test" -*-
# Should be under default: but then gitlab-runner fails at finding it :(
image: paternal/pythons@sha256:50a7f31a5f155bd39e1892f242ac828e343ec9f45e5ca966002aeaf809b274e3
default:
# Gitlab-ci shared runner
tags:
- ci.inria.fr
- small
stages:
- build
- test
- release
- deploy
test:
stage: test
script:
- apt-get update && apt-get install -y curl
- python3 -m pip install hatch
- hatch run lint:check && hatch run test:pytest && hatch run cov:run
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
build-wheel:
stage: build
artifacts:
paths:
- dist/
script:
- python3 -m pip install hatch
- hatch build -t wheel
pypi-publish:
stage: release
only:
- tags
script:
- python3 -m pip install hatch
- unset LD_PRELOAD && hatch publish
pages:
stage: deploy
script:
- python3 -m pip install hatch
- unset LD_PRELOAD && hatch run docs:build
- mkdir -p public
- mv docs/_build/html/* public/
artifacts:
paths:
- public/
only:
- master