Adds .forgejo/workflows/ci.yml (black/flake8/pytest) and publish-python-package.yml (twine → forgejo PyPI), modeled on issue-core. Removes the frozen-gitea ci.yml and publish workflows. CUST-WP-0059 T02-T04. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
1,008 B
YAML
40 lines
1,008 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Fetch source archive
|
|
env:
|
|
REF: ${{ github.sha }}
|
|
run: |
|
|
set -eu
|
|
mkdir -p repo
|
|
wget -qO /tmp/repo.tar.gz \
|
|
"https://forgejo.coulomb.social/${GITHUB_REPOSITORY}/archive/${REF}.tar.gz"
|
|
tar xzf /tmp/repo.tar.gz -C repo --strip-components=1
|
|
|
|
- name: Install package and dev tools
|
|
working-directory: repo
|
|
run: |
|
|
python3 -m pip install --upgrade pip
|
|
python3 -m pip install -e ".[dev]"
|
|
|
|
- name: Format check (black)
|
|
working-directory: repo
|
|
run: black --check src tests
|
|
|
|
- name: Lint (flake8)
|
|
working-directory: repo
|
|
run: flake8 src/ --max-line-length=100
|
|
|
|
- name: Run tests
|
|
working-directory: repo
|
|
run: pytest tests/ -q --ignore=tests/test_cli_error_handling.py
|