ci: add pytest job
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
cătălin 2022-08-27 16:36:39 +02:00
commit 435946f769
Signed by: catalin
GPG key ID: 0178DF42F43E5FD2

View file

@ -13,67 +13,73 @@ environment:
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: 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 dependencies
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- poetry config virtualenvs.in-project 1
- poetry install --with linters
- name: install dependencies
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- poetry config virtualenvs.in-project 1
- poetry install --with linters,test
- name: lint
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- .venv/bin/pre-commit run --all-files --color always
- name: lint
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- .venv/bin/pre-commit run --all-files --color always
- name: deploy
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- poetry build
- poetry config repositories.roboces https://git.roboces.dev/api/packages/catalin/pypi
- poetry config http-basic.roboces "$REGISTRY_USERNAME" "$REGISTRY_PASSWORD"
- poetry publish --repository roboces
when:
ref:
- refs/tags/v*
- name: tests
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- .venv/bin/pytest
- 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
- name: deploy
pull: true
image: git.roboces.dev/catalin/poetry:beta
commands:
- poetry build
- poetry config repositories.roboces https://git.roboces.dev/api/packages/catalin/pypi
- poetry config http-basic.roboces "$REGISTRY_USERNAME" "$REGISTRY_PASSWORD"
- poetry publish --repository roboces
when:
ref:
- refs/tags/v*
- 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