40 lines
1006 B
YAML
Executable File
40 lines
1006 B
YAML
Executable File
# requires up-to-date conda environment to run the tests as
|
|
# the gitlab runner does not have access to /sf...
|
|
|
|
build-job:
|
|
stage: build
|
|
script:
|
|
- echo "Hello, $GITLAB_USER_LOGIN!"
|
|
|
|
run_tests:
|
|
stage: test
|
|
before_script:
|
|
- echo "Running as $(whoami)"
|
|
- echo "$CI_BUILDS_DIR"
|
|
- eval "$(/home/gitlab-runner/bin/micromamba shell hook --shell=bash)"
|
|
- micromamba activate cristallina
|
|
- echo `pwd`
|
|
- pip install -e .
|
|
script:
|
|
- echo "Starting pytest run"
|
|
- coverage run -m pytest
|
|
- coverage report
|
|
coverage: '/TOTAL.*\s+(\d+\%)/'
|
|
|
|
pages:
|
|
stage: deploy
|
|
before_script:
|
|
- echo "$CI_BUILDS_DIR"
|
|
- eval "$(/home/gitlab-runner/bin/micromamba shell hook --shell=bash)"
|
|
- micromamba activate cristallina
|
|
script:
|
|
- tox -e docs
|
|
- mv docs/_build/html/ public/
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
rules:
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
|
|
|