44 lines
613 B
Django/Jinja
44 lines
613 B
Django/Jinja
stages:
|
|
- lint
|
|
- test
|
|
- build
|
|
|
|
lint:
|
|
stage: lint
|
|
image: python:3.11
|
|
script:
|
|
- pip install flake8 black
|
|
- flake8 .
|
|
- black --check .
|
|
only:
|
|
- main
|
|
- master
|
|
|
|
test:
|
|
stage: test
|
|
image: python:3.11
|
|
script:
|
|
- pip install -e ".[dev]"
|
|
- pytest -v --cov={{ project_slug }} --cov-report=html
|
|
artifacts:
|
|
reports:
|
|
junit: test-results.xml
|
|
paths:
|
|
- htmlcov/
|
|
only:
|
|
- main
|
|
- master
|
|
|
|
build:
|
|
stage: build
|
|
image: python:3.11
|
|
script:
|
|
- pip install build
|
|
- python -m build
|
|
artifacts:
|
|
paths:
|
|
- dist/
|
|
only:
|
|
- main
|
|
- tags
|