mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-05-10 23:10:08 +02:00
## Add Taskfile for unified dev workflow ### Summary - Introduces [Taskfile](https://taskfile.dev/) as the single CLI entry point for all development workflows across backend, frontend, engine, Docker, and desktop - ~80 tasks organized into 6 namespaces: `backend:`, `frontend:`, `engine:`, `docker:`, `desktop:`, plus root-level composites - All CI workflows migrated to use Task - Deletes `engine/Makefile` and `scripts/build-tauri-jlink.{sh,bat}` — replaced by Task equivalents - Removes redundant npm scripts (`dev`, `build`, `prep`, `lint`, `test`, `typecheck:all`) from `package.json` - Smart dependency caching: `sources`/`status`/`generates` fingerprinting, CI-aware `npm ci` vs `npm install`, `run: once` for parallel dep deduplication ### What this does NOT do - Does not replace Gradle, npm, or Docker — Taskfile is a thin orchestration wrapper - Does not change application code or behavior ### Install ``` npm install -g @go-task/cli # or: brew install go-task, winget install Task.Task ``` ### Quick start ``` task --list # discover all tasks task install # install all deps task dev # start backend + frontend task dev:all # also start AI engine task test # run all tests task check # quick quality gate (local dev) task check:all # full CI quality gate ``` ### Test plan - [ ] Install `task` CLI and run `task --list` — verify all tasks display - [ ] Run `task install` — verify frontend + engine deps install - [ ] Run `task dev` — verify backend + frontend start, Ctrl+C exits cleanly - [ ] Run `task frontend:check` — verify typecheck + lint + test pass - [ ] Run `task desktop:dev` — verify jlink builds are cached on second run - [ ] Verify CI passes on all workflows --------- Co-authored-by: James Brunton <jbrunton96@gmail.com>
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
name: AI Engine CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
engine:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v4
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Install Task
|
|
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
|
|
|
|
- name: Run fixers
|
|
# Ignore errors here because we're going to add comments for them in the following steps before actually failing
|
|
run: task engine:fix || true
|
|
|
|
- name: Check for fixer changes
|
|
id: fixer_changes
|
|
run: |
|
|
if git diff --quiet; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Post fixer suggestions
|
|
if: steps.fixer_changes.outputs.changed == 'true' && github.event_name == 'pull_request'
|
|
uses: reviewdog/action-suggester@v1
|
|
continue-on-error: true
|
|
with:
|
|
tool_name: engine-make-fix
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
filter_mode: file
|
|
fail_level: any
|
|
level: info
|
|
|
|
- name: Comment on fixer suggestions
|
|
if: steps.fixer_changes.outputs.changed == 'true' && github.event_name == 'pull_request'
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
await github.rest.issues.createComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number,
|
|
body: "The Python code in your PR has formatting/linting issues. Consider running `task engine:fix` locally or setting up your editor's Ruff integration to auto-format and lint your files as you go, or commit the suggested changes on this PR.",
|
|
});
|
|
|
|
- name: Verify fixer changes are committed
|
|
if: steps.fixer_changes.outputs.changed == 'true'
|
|
run: |
|
|
if ! git diff --exit-code; then
|
|
echo "Fixes are out of date."
|
|
echo "Apply the reviewdog suggestions or run 'task engine:fix' from the repo root and commit the updated files."
|
|
git --no-pager diff --stat
|
|
exit 1
|
|
fi
|
|
|
|
- name: Run linting
|
|
run: task engine:lint
|
|
|
|
- name: Run type checking
|
|
run: task engine:typecheck
|
|
|
|
- name: Run tests
|
|
run: task engine:test
|