mirror of
https://github.com/Dasemu/faust-vn.git
synced 2026-11-27 07:46:29 +00:00
chore: merge remote bootstrap and wire CI, hooks and branch model to the uv stack
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
6486ab10f4
7 files changed
+124
-4
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
2
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"hooks": {
|
||||||
|
"PostToolUse": [
|
||||||
|
{
|
||||||
|
"matcher": "Edit|Write",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "uv run --quiet ruff format --quiet src tests 2>/dev/null || true"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Stop": [
|
||||||
|
{
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "uv run --quiet ruff check --quiet . && uv run --quiet pytest -q -x 2>&1 | tail -3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [development]
|
||||||
|
push:
|
||||||
|
branches: [development, main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: astral-sh/setup-uv@v5
|
||||||
|
- run: uv sync --locked
|
||||||
|
- name: Lint
|
||||||
|
run: uv run ruff check . && uv run ruff format --check .
|
||||||
|
- name: Test
|
||||||
|
run: uv run pytest -q
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
name: Version bump
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [development, main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bump:
|
||||||
|
if: github.actor != 'github-actions[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Configure git
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Bump version
|
||||||
|
id: bump
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
CURRENT=$(cat VERSION)
|
||||||
|
MAJOR=$(echo "$CURRENT" | cut -d. -f1)
|
||||||
|
MINOR=$(echo "$CURRENT" | cut -d. -f2)
|
||||||
|
PATCH=$(echo "$CURRENT" | cut -d. -f3)
|
||||||
|
|
||||||
|
if [ "${{ github.ref_name }}" = "development" ]; then
|
||||||
|
PATCH=$((PATCH + 1))
|
||||||
|
elif [ "${{ github.ref_name }}" = "main" ]; then
|
||||||
|
# Did this push bring in commits that all come from development
|
||||||
|
# (i.e. an approved development -> main PR merge)?
|
||||||
|
PARENTS=$(git log -1 --pretty=%P HEAD)
|
||||||
|
PARENT_COUNT=$(echo "$PARENTS" | wc -w)
|
||||||
|
if [ "$PARENT_COUNT" -gt 1 ] && [ "${{ github.event.head_commit.message }}" != "" ] && git log -1 --pretty=%B | grep -qi "development"; then
|
||||||
|
MINOR=$((MINOR + 1))
|
||||||
|
PATCH=0
|
||||||
|
else
|
||||||
|
PATCH=$((PATCH + 1))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
|
||||||
|
echo "$NEW_VERSION" > VERSION
|
||||||
|
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Commit version bump
|
||||||
|
run: |
|
||||||
|
git add VERSION
|
||||||
|
git commit -m "chore(release): v${{ steps.bump.outputs.new_version }} [skip ci]"
|
||||||
|
git push origin HEAD:${{ github.ref_name }}
|
||||||
|
|
||||||
|
- name: Merge main back into development
|
||||||
|
if: github.ref_name == 'main'
|
||||||
|
run: |
|
||||||
|
git fetch origin development
|
||||||
|
git checkout development
|
||||||
|
git merge --no-edit main
|
||||||
|
git push origin development
|
||||||
+4
-3
@@ -18,10 +18,11 @@ vn/*/traceback.txt
|
|||||||
vn/*/errors.txt
|
vn/*/errors.txt
|
||||||
vn/*/lint.txt
|
vn/*/lint.txt
|
||||||
# Local Ren'Py SDK and builds
|
# Local Ren'Py SDK and builds
|
||||||
tools/
|
/tools
|
||||||
build/
|
build/
|
||||||
# Local agent/sandbox state
|
# Local agent state (shared settings in .claude/settings.json are committed)
|
||||||
.claude/
|
.claude/settings.local.json
|
||||||
|
.claude/worktrees/
|
||||||
.mcp.json
|
.mcp.json
|
||||||
# Original generated images are large; final processed assets are committed instead
|
# Original generated images are large; final processed assets are committed instead
|
||||||
works/*/assets/raw/
|
works/*/assets/raw/
|
||||||
|
|||||||
@@ -14,8 +14,16 @@ Pipeline (`vnpipe`) that turns a public-domain play into a Ren'Py visual novel;
|
|||||||
- `uv sync` — install. `uv run pytest` — tests. `uv run ruff check . && uv run ruff format --check .` — lint.
|
- `uv sync` — install. `uv run pytest` — tests. `uv run ruff check . && uv run ruff format --check .` — lint.
|
||||||
- `uv run vnpipe --help` — pipeline CLI. Stages: `fetch`, `parse`, `annotate {chunk,status,prompt,merge}`,
|
- `uv run vnpipe --help` — pipeline CLI. Stages: `fetch`, `parse`, `annotate {chunk,status,prompt,merge}`,
|
||||||
`assets {prompt,import,process,status,placeholders,sheet}`, `renpy [--with-test]`.
|
`assets {prompt,import,process,status,placeholders,sheet}`, `renpy [--with-test]`.
|
||||||
- Ren'Py SDK lives in `tools/renpy-sdk` (gitignored); prefix SDK commands with `HOME=$TMPDIR/renpy-home`.
|
- Ren'Py SDK lives in `tools/renpy-sdk` (gitignored; may be a symlink shared between worktrees).
|
||||||
|
Inside the sandbox prefix SDK commands with `HOME=$TMPDIR/renpy-home`.
|
||||||
Lint: `tools/renpy-sdk/renpy.sh vn/faust lint`. Playthrough test and builds: `docs/running.md`.
|
Lint: `tools/renpy-sdk/renpy.sh vn/faust lint`. Playthrough test and builds: `docs/running.md`.
|
||||||
|
|
||||||
|
## Branches and versions
|
||||||
|
- `development` is the integration branch; `main` receives reviewed merges from it.
|
||||||
|
Feature work branches off `development` (`feat/...`, `fix/...`).
|
||||||
|
- `VERSION` is bumped by `.github/workflows/version.yml` on push (patch on `development`,
|
||||||
|
minor on a `development` → `main` merge). Do not edit it by hand.
|
||||||
|
- CI (`.github/workflows/ci.yml`) runs ruff and pytest.
|
||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
See `docs/plan.md`.
|
See `docs/plan.md`.
|
||||||
Reference in new issue
Block a user