Created
December 8, 2019 13:42
-
-
Save Gr1N/a5be8da3b9ea2631313cbd6a8839ef80 to your computer and use it in GitHub Desktop.
Why Drone CI can be interesting for you? Example of Bitbucket Pipelines configuration using YAML anchors and aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
definitions: | |
caches: | |
poetry-path: /root/.poetry | |
poetry-venv: /root/.cache/pypoetry/virtualenvs | |
steps: | |
- step: &step-37 | |
image: python:3.7 | |
caches: | |
- poetry-path | |
- poetry-venv | |
- step: &step-38 | |
image: python:3.8 | |
caches: | |
- poetry-path | |
- poetry-venv | |
scripts: | |
- script: &script-install poetry install -vv | |
- script: &script-test poetry run pytest . | |
pipelines: | |
default: | |
- step: | |
<<: *step-37 | |
name: deps-3.7 | |
script: | |
- *script-install | |
- step: | |
<<: *step-38 | |
name: deps-3.8 | |
script: | |
- *script-install | |
- step: | |
<<: *step-38 | |
name: lint-3.8 | |
script: | |
- poetry run black --check --diff . | |
- poetry run flake8 . | |
- poetry run isort --check-only --diff --recursive | |
- step: | |
<<: *step-37 | |
name: test-3.7 | |
script: | |
- *script-test | |
- step: | |
<<: *step-38 | |
name: test-3.8 | |
script: | |
- *script-test | |
- step: | |
<<: *step-38 | |
name: publish-3.8 | |
script: | |
- poetry publish --build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment