Skip to content

Commit 65ea840

Browse files
committed
build the Dockerimage used in CI
1 parent b00f266 commit 65ea840

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

.gitlab-ci.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
1-
image: quantumtinkerer/research
1+
image: gitlab.kwant-project.org:5005/qt/adaptive:latest
2+
3+
stages:
4+
- prebuild
5+
- test
6+
7+
build docker:
8+
stage: prebuild
9+
image:
10+
name: gcr.io/kaniko-project/executor:debug
11+
entrypoint: [""]
12+
before_script:
13+
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
14+
- export CI_REF=${CI_COMMIT_TAG:-latest}
15+
script:
16+
- /kaniko/executor
17+
--context $CI_PROJECT_DIR
18+
--dockerfile $CI_PROJECT_DIR/Dockerfile
19+
--destination $CI_REGISTRY_IMAGE:$CI_REF
20+
only:
21+
changes:
22+
- Dockerfile
23+
- environment.yml
24+
- test-requirements.txt
225

326
test:
27+
stage: test
428
script:
5-
- pip install -r test-requirements.txt
6-
- conda install -y -q scikit-optimize
729
- py.test --verbose --cov=adaptive --cov-report term --cov-report html adaptive
830
artifacts:
931
paths:
1032
- htmlcov
1133

1234
authors check:
35+
stage: test
1336
script:
1437
- MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"')
1538
- if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi
1639
allow_failure: true
1740

1841
check whitespace style:
42+
stage: test
1943
script: ./check_whitespace
2044
allow_failure: true

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Docker image for testing adaptive
2+
FROM conda/miniconda3:latest
3+
4+
# make our environment sane
5+
ENV LANG C.UTF-8
6+
ENV LC_ALL C.UTF-8
7+
8+
COPY environment.yml test-requirements.txt /
9+
10+
RUN conda env update --quiet -n root -f environment.yml
11+
RUN conda clean --yes --all
12+
RUN pip install -r test-requirements.txt

0 commit comments

Comments
 (0)