-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
60 lines (50 loc) · 1.27 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
stages:
- docker-build
- install
- lint
- test
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
build_docker_env:
stage: docker-build
image: docker:git
script:
- docker login -u $CI_REGISTRY_USER -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build --load -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only:
refs:
- pushes
changes:
- Dockerfile
install_gpx:
stage: install
image: $IMAGE_TAG:latest
script:
- source /usr/src/app/venv/bin/activate
- pip3 install numpy tabulate typing_extensions "jax[cpu]" tqdm optax nlopt
- pip3 install .
run_tests:
stage: test
image: $IMAGE_TAG:latest
script:
- source /usr/src/app/venv/bin/activate
- pip3 install tox
- tox -e tests
run_lint:
stage: lint
image: $IMAGE_TAG:latest
script:
- source /usr/src/app/venv/bin/activate
- pip3 install tox
- tox -e lint