Commit 34c0f02c authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

Tentative initial CI tests

parent 8be69517
Pipeline #101931 failed
image: docker:git
stages:
- build
- test
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
after_script:
- 'docker logout $CI_REGISTRY'
variables:
IMAGE: ${CI_REGISTRY_IMAGE}
build-image:
stage: build #and stage
services: docker:dind
image: docker:git
before_script:
- docker login -u gitlab-ci-token -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull jupyter/tensorflow-notebook
- docker build -t ${IMAGE} .
- docker push ${IMAGE}
after_script:
- 'docker logout $CI_REGISTRY'
only:
changes:
- Dockerfile
- environment.yml
image: ${IMAGE}
tests_python_packages:
stage: test
script:
- docker pull jupyter/tensorflow-notebook
- docker build -t gitlab-registry.in2p3.fr/jupyterhub-paris-saclay/image .
- docker push gitlab-registry.in2p3.fr/jupyterhub-paris-saclay/image
- pytest
def test_python_version():
import sys
assert sys.version_info.major == 3
assert sys.version_info.minor == 8
def test_tensorflow():
import tensorflow
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment