mirror of
https://github.com/lemeow125/Service_Queue.git
synced 2025-09-20 14:33:02 +08:00
Add lint and test steps
This commit is contained in:
parent
30eea7e784
commit
06e3d3bc49
5 changed files with 66 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Deployment YML for Woodpecker CI/CD
|
# Deployment step for Woodpecker CI/CD
|
||||||
# Ephemeral volumes - Data is not persisted across deployments (i.e. database volume)
|
# Ephemeral volumes - Data is not persisted across deployments (i.e. database volume)
|
||||||
# Remove line 29 for persistent volumes
|
# Remove line 29 for persistent volumes
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Build YML for Woodpecker CI/CD
|
# Build step for Woodpecker CI/CD
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Deployment file for Woodpecker CI/CD
|
# Deployment step for Woodpecker CI/CD
|
||||||
# No volumes - Suited for deployments without local databases (i.e. external PostgreSQL instance)
|
# No volumes - Suited for deployments without local databases (i.e. external PostgreSQL instance)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
30
.woodpecker/.lint.yml
Normal file
30
.woodpecker/.lint.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# Python lint step for Woodpecker CI/CD
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: linux/amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: lint
|
||||||
|
image: astral/uv:python3.13-trixie-slim
|
||||||
|
# TODO: Change src path
|
||||||
|
commands:
|
||||||
|
- uv sync --frozen
|
||||||
|
- export PATH=".venv/bin:$PATH"
|
||||||
|
- ruff check src/. --no-fix --diff --show-files --verbose
|
||||||
|
- name: discord
|
||||||
|
image: appleboy/drone-discord
|
||||||
|
settings:
|
||||||
|
webhook_id:
|
||||||
|
from_secret: DISCORD_WEBHOOK_ID
|
||||||
|
webhook_token:
|
||||||
|
from_secret: DISCORD_WEBHOOK_TOKEN
|
||||||
|
message: >
|
||||||
|
{{#success build.status}}
|
||||||
|
{{repo.name}}: Lint step for build #{{build.number}} output {{build.status}}
|
||||||
|
{{/success}}
|
||||||
|
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- manual
|
33
.woodpecker/.test.yml
Normal file
33
.woodpecker/.test.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Python test step for Woodpecker CI/CD
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: linux/amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: astral/uv:python3.13-trixie-slim
|
||||||
|
# TODO: Add necessary environment variables below
|
||||||
|
# environment:
|
||||||
|
# variable:
|
||||||
|
# from_secret: variable
|
||||||
|
commands:
|
||||||
|
- uv sync --frozen
|
||||||
|
- export PATH=".venv/bin:$PATH"
|
||||||
|
- pytest
|
||||||
|
- name: discord
|
||||||
|
image: appleboy/drone-discord
|
||||||
|
settings:
|
||||||
|
webhook_id:
|
||||||
|
from_secret: DISCORD_WEBHOOK_ID
|
||||||
|
webhook_token:
|
||||||
|
from_secret: DISCORD_WEBHOOK_TOKEN
|
||||||
|
message: >
|
||||||
|
{{#success build.status}}
|
||||||
|
{{repo.name}}: Test step for build #{{build.number}} output {{build.status}}
|
||||||
|
{{/success}}
|
||||||
|
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- manual
|
Loading…
Add table
Add a link
Reference in a new issue