1
0
mirror of synced 2024-09-23 18:58:21 +02:00
jubeatools/.gitlab-ci.yml

36 lines
897 B
YAML
Raw Normal View History

2022-03-08 22:18:08 +01:00
image: python:latest
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
2022-09-21 01:07:12 +02:00
- if: $CI_COMMIT_TAG
2022-03-08 22:18:08 +01:00
stages:
2022-11-03 21:00:47 +01:00
- test
2022-03-08 22:18:08 +01:00
# Move pip's and poetry's caches to somewhere gitlab can cache
# https://pip.pypa.io/en/stable/topics/configuration/#environment-variables
# https://python-poetry.org/docs/configuration/#using-environment-variables
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
POETRY_VIRTUALENVS_PATH: "$CI_PROJECT_DIR/.cache/poetry"
cache:
paths:
- .cache/pip
- .cache/poetry
- .mypy_cache
before_script:
- pip install poetry
- poetry install
test:
2022-11-03 21:00:47 +01:00
stage: test
script:
- poetry run isort --check-only jubeatools
- poetry run black --check jubeatools
- poetry run flake8 jubeatools
- poetry run mypy jubeatools
- poetry run pytest jubeatools --hypothesis-profile ci