This commit is contained in:
parent
57151b1346
commit
66f3f53ca5
3 changed files with 34 additions and 37 deletions
96
.drone.yml
Normal file
96
.drone.yml
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/**
|
||||
- refs/tags/v*
|
||||
environment:
|
||||
REGISTRY_HOST: https://git.roboces.dev
|
||||
DESTINATION_PREFIX: git.roboces.dev/catalin/halig
|
||||
PRE_COMMIT_HOME: /drone/src/.cache/.pre-commit
|
||||
|
||||
steps:
|
||||
- name: restore_cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
settings:
|
||||
restore: true
|
||||
bucket: halig-cache
|
||||
endpoint: https://s3.fukurokuju.dev
|
||||
region: us-east-1
|
||||
path_style: true
|
||||
mount:
|
||||
- .venv
|
||||
- .cache/.pre-commit
|
||||
|
||||
- name: install_deps
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/pdm:latest-311
|
||||
commands:
|
||||
- pdm install -G :all
|
||||
depends_on:
|
||||
- restore_cache
|
||||
|
||||
- name: lints 311
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/pdm:latest-311
|
||||
commands:
|
||||
- pdm run pre-commit run --all-files --color always
|
||||
depends_on:
|
||||
- install_deps
|
||||
|
||||
- name: tests 311
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/pdm:latest-311
|
||||
commands:
|
||||
- pdm run pytest --cov=halig -vv tests --report-log reportlog.json
|
||||
- pdm run coverage html
|
||||
- pdm run coverage xml
|
||||
depends_on:
|
||||
- install_deps
|
||||
|
||||
- name: deploy
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- pdm publish -u $(PYPI_REGISTRY_USERNAME) -P $(PYPI_REGISTRY_PASSWORD)
|
||||
- pdm publish -u $(ROBOCES_REGISTRY_USERNAME) -P $(ROBOCES_REGISTRY_PASSWORD) -r https://git.roboces.dev/api/packages/catalin/pypi
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/v*
|
||||
depends_on:
|
||||
- lint
|
||||
- tests
|
||||
|
||||
- name: rebuild cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
settings:
|
||||
rebuild: true
|
||||
path_style: true
|
||||
bucket: halig-cache
|
||||
endpoint: https://s3.fukurokuju.dev
|
||||
region: us-east-1
|
||||
mount:
|
||||
- .venv
|
||||
- .cache/.pre-commit
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
- success
|
||||
depends_on:
|
||||
- lint
|
||||
- tests
|
||||
Loading…
Add table
Add a link
Reference in a new issue