ci: add forgejo checks workflow
This commit is contained in:
parent
2fcc9db903
commit
04afead5af
2 changed files with 42 additions and 0 deletions
37
.forgejo/workflows/ci.yml
Normal file
37
.forgejo/workflows/ci.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
name: Backend Checks
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
- name: Run backend quality checks
|
||||
run: |
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
./scripts/check_python_quality.sh
|
||||
|
||||
frontend:
|
||||
name: Frontend Checks
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Install Bun
|
||||
run: curl -fsSL https://bun.sh/install | bash
|
||||
|
||||
- name: Install frontend dependencies
|
||||
run: ${HOME}/.bun/bin/bun install --cwd frontend --frozen-lockfile
|
||||
|
||||
- name: Run frontend quality checks
|
||||
run: ./scripts/check_frontend_quality.sh
|
||||
|
|
@ -44,6 +44,11 @@ Always run `./scripts/check_python_quality.sh` after making backend Python chang
|
|||
- Manual install is `~/.bun/bin/bun run hooks:install` from `frontend/` or `./scripts/install_git_hooks.sh` from the repo root
|
||||
- The `pre-commit` hook runs `./scripts/check_python_quality.sh` for staged backend changes and `./scripts/check_frontend_quality.sh` for staged frontend changes
|
||||
|
||||
## CI
|
||||
|
||||
- Forgejo CI lives in `.forgejo/workflows/ci.yml`
|
||||
- Pushes and pull requests run the same backend and frontend check scripts used locally
|
||||
|
||||
## Linting rules
|
||||
|
||||
- Linter: Biome (config at `frontend/biome.json`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue