- Add .forgejo/workflows/ci.yaml for lint/test/type-check - Add .forgejo/workflows/deploy.yaml for build/deploy - Update DEPLOYMENT.md with Forgejo-specific instructions - Remove .gitlab-ci.yml
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
PIP_CACHE_DIR: ${{ github.workspace }}/.cache/pip
|
|
PYTHONUNBUFFERED: "1"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: docker
|
|
container:
|
|
image: python:3.12-slim
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install ruff black
|
|
- name: Run ruff
|
|
run: ruff check app tests scripts
|
|
- name: Run black
|
|
run: black --check app tests scripts
|
|
|
|
test:
|
|
runs-on: docker
|
|
container:
|
|
image: python:3.12-slim
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements-dev.txt
|
|
- name: Run tests
|
|
run: pytest -q tests
|
|
- name: Upload coverage
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-report
|
|
path: htmlcov/
|
|
retention-days: 7
|
|
|
|
type-check:
|
|
runs-on: docker
|
|
container:
|
|
image: python:3.12-slim
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install mypy
|
|
pip install -r requirements.txt
|
|
- name: Run mypy
|
|
run: mypy app scripts --ignore-missing-imports |