Commit ea8fe3b7 authored by Moul's avatar Moul

Use extends from GitLab 12.0

parent 8aacbc29
......@@ -9,15 +9,15 @@ variables:
image: $DOCKER_IMAGE/3.7:latest
.code_changes: &code_changes
.code_changes:
only:
changes:
- bin/silkaj
- silkaj/*.py
- tests/*.py
.changes: &changes
<<: *code_changes
.changes:
extends: .code_changes
only:
changes:
- .gitlab-ci.yml
......@@ -25,46 +25,46 @@ image: $DOCKER_IMAGE/3.7:latest
- poetry.lock
build:
<<: *changes
extends: .changes
stage: checks
script:
- poetry install --no-dev
- poetry build
format:
<<: *code_changes
extends: .code_changes
stage: checks
script:
- poetry install
- poetry run black --check bin silkaj tests
.type:
<<: *code_changes
extends: .code_changes
stage: checks
script:
- poetry install
- poetry run mypy/pyright
.tests: &tests
<<: *changes
.tests:
extends: .changes
stage: tests
before_script:
- poetry install
tests-3.5:
<<: *tests
extends: .tests
image: $DOCKER_IMAGE/3.5:latest
script:
- poetry run pytest
tests-3.6:
<<: *tests
extends: .tests
image: $DOCKER_IMAGE/3.6:latest
script:
- poetry run pytest
tests-3.7:
<<: *tests
extends: .tests
image: $DOCKER_IMAGE/3.7:latest
script:
- poetry run pytest --cov silkaj --cov-report html:cov_html
......@@ -91,7 +91,7 @@ pypi:
- poetry publish --build --username GitLab --password $PYPI_PASSWORD
pages:
<<: *code_changes
extends: .code_changes
stage: coverage
script: mv cov_html/ public/
artifacts:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment