.gitlab-ci.yml 1.24 KB
Newer Older
1
image: quantumtinkerer/research
2

3 4
## Documentation for the format of this file can be found here:
## https://docs.gitlab.com/ce/ci/yaml/README.html#configuration-of-your-builds-with-gitlab-ci-yml
5

6 7 8 9 10 11 12
test build:
  stage: build
  script: python setup.py develop
  artifacts:
    paths:
      - semicon/model_cache.json
    expire_in: 2 hour
13

Bas Nijholt's avatar
Bas Nijholt committed
14 15
test linting:
  script:
Bas Nijholt's avatar
Bas Nijholt committed
16 17
    - conda env create -f docker/semicon-latest.yml
    - source activate semicon-latest
18
    - mkdir ~/pre-commit && export PRE_COMMIT_HOME=/home/jovyan/pre-commit
Bas Nijholt's avatar
Bas Nijholt committed
19 20 21 22
    - pre-commit install
    - pre-commit run --all
  stage: test

23
test stable requirements:
24
  script:
25 26 27
    - conda env create -f docker/semicon-stable.yml
    - source activate semicon-stable
    - py.test semicon/ --cov=semicon --verbose --cov-report term
28
  stage: test
29 30

test latest requirements:
31
  script:
32 33 34 35
    - conda env create -f docker/semicon-latest.yml
    - source activate semicon-latest
    - py.test semicon/ --cov=semicon --verbose --cov-report term
  stage: test
Joseph Weston's avatar
Joseph Weston committed
36 37 38

test packaging:
  script:
39 40 41
    - conda env create -f docker/semicon-stable.yml
    - source activate semicon-stable
    - python setup.py install
Joseph Weston's avatar
Joseph Weston committed
42
    - cd /  # make sure we don't import the cloned version
43 44
    - python -c 'import semicon; semicon.test()'
  stage: test