Skip to content

Instantly share code, notes, and snippets.

@Gr1N
Created December 8, 2019 13:42
Show Gist options
  • Save Gr1N/a5be8da3b9ea2631313cbd6a8839ef80 to your computer and use it in GitHub Desktop.
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
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