feat: check formatting, linting and tests in CI
Every push runs ruff, prettier, pytest and svelte-check; a tagged release runs the blocking half again before it publishes an image. eslint and svelte-check report without failing, since 87 and 30 findings predate the workflow.
This commit is contained in:
@@ -23,7 +23,42 @@ env:
|
||||
REGISTRY: git.jaroszew.ski
|
||||
|
||||
jobs:
|
||||
# The blocking half of ci.yml, run again on the tagged commit so a release cannot publish
|
||||
# an image whose tests fail. Deliberately duplicated rather than shared: Gitea's support
|
||||
# for reusable workflows is thinner than GitHub's, and this is a dozen lines.
|
||||
# Keep in step with ci.yml.
|
||||
quality:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Backend format, lint and tests
|
||||
working-directory: backend
|
||||
run: |
|
||||
uv sync --locked
|
||||
uv run ruff format --check src/
|
||||
uv run ruff check src/
|
||||
uv run pytest tests/ -q
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Frontend format
|
||||
working-directory: frontend
|
||||
run: |
|
||||
corepack enable
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm exec prettier --check .
|
||||
|
||||
build:
|
||||
needs: quality
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user