Skip to content
Snippets Groups Projects
.gitlab-ci.yml 2.47 KiB
# ===========================================================
# preparation
# ===========================================================

variables:
  GIT_SUBMODULE_STRATEGY: recursive

default:
  image: python:3.8
  before_script:
    - pip install --upgrade pip
    - pip install pytest
    - pip install -r requirements.txt


# ===========================================================
# normal jobs (non scheduled)
# ===========================================================

# test saqc with python 3.7
python37:
  stage: test
  except:
    - schedules
  image: python:3.7
  script:
    - pytest tests/core tests/funcs tests/integration dios/test -Werror
    - python -m saqc --config ressources/data/config.csv --data ressources/data/data.csv --outfile /tmp/test.csv


# test saqc with python 3.8
python38:
  stage: test
  except:
    - schedules
  script:
    - pytest tests/core tests/funcs tests/integration dios/test -Werror
    - python -m saqc --config ressources/data/config.csv --data ressources/data/data.csv --outfile /tmp/test.csv


# test saqc with python 3.9
python39:
  stage: test
  except:
    - schedules
  image: python:3.9
  script:
    - pytest tests/core tests/funcs tests/integration dios/test -Werror
    - python -m saqc --config ressources/data/config.csv --data ressources/data/data.csv --outfile /tmp/test.csv


# check if everthing is properly formatted
black:
  stage: test
  script:
    - pip install black
    - black --check .


# make (visual) coverage in gitlab merge request diff's
coverage:
  stage: test
  except:
    - schedules
  allow_failure: true
  script:
    - pip install pytest-cov coverage
    - pytest --cov=saqc tests/core tests/funcs -Werror
  after_script:
    - coverage xml