Commit df35f7b
* ci: add GitHub Actions workflow that runs the unittest suite (closes #13)
There was no CI on this repository — 137 unit tests in tests/ were only
ever run when a developer remembered to run them locally. A regression
that broke CLI parity, exclusion rules, exporter output, alias
inference, or search filtering could land on master with no gate.
New workflow `.github/workflows/tests.yml`:
- Triggers on every push to master and every pull request.
- Single ubuntu-latest runner, Python 3.12.
- Installs only what the tests need (flask, fpdf2). pywebview from
requirements.txt is the desktop-launcher dep and pulls GTK / Qt
system packages — out of scope for the unittest suite, so it is
deliberately omitted from the CI install. The unittest suite
imports neither.
- Runs `python -m unittest discover tests -v`.
Local sanity-check with the same command on Python 3.12: 137/137 OK.
* ci: pin action versions to immutable commit SHAs (CodeRabbit on PR #14)
Replace @v4 / @v5 tag refs with the matching commit SHAs on
actions/checkout and actions/setup-python. Tags are mutable — a
compromised maintainer can repoint them, silently swapping the code
that runs in our CI runner. SHAs are immutable and remove that
class of supply-chain risk.
Verified each SHA against the live tag on github.com:
gh api repos/actions/checkout/git/ref/tags/v4 \
--jq '.object.sha' # 34e114876b0b11c390a56381ad16ebd13914f8d5
gh api repos/actions/setup-python/git/ref/tags/v5 \
--jq '.object.sha' # a26af69be951a213d495a4c3e4e4022e16d87065
The trailing `# v4` / `# v5` comments preserve the major-version
intent so future bumps stay deliberate. The leading comment block
documents the bump procedure for the next person.
* ci: expand to multi-OS + multi-Python matrix, add mypy + gitleaks (closes #13)
The previous shape was a single ubuntu-latest / Python 3.12 unittest
job. Expanded to match the broader gate quality the team adopted on
the-claw:
- unittest: 3 OSes × 3 Pythons = 9 cells (3.11 / 3.12 / 3.13 across
ubuntu-latest, macos-latest, windows-latest). Catches Python version
drift and the rare path / line-ending issue single-OS hides. fail-fast
false so cells run independently.
- typecheck: mypy on Python 3.12. Codebase already has 70+ typed
functions across 30 .py files, so mypy actually does work. Lenient
config (--ignore-missing-imports, --no-strict-optional) +
continue-on-error step until the surface is clean.
- secret-scan: gitleaks 8.21.2 with checksum verification (mirrors
the-claw's setup verbatim). No project-specific .gitleaks.toml; uses
defaults for standard credential patterns.
Concurrency block added so a new push to the same ref cancels the
in-flight run, reducing CI minutes.
Action SHAs unchanged from the previous workflow (already pinned).
* ci: explicit least-privilege GITHUB_TOKEN permissions (CodeRabbit on PR #19)
Adds workflow-level `permissions: contents: read` so a compromised
action step in any matrix cell can't write back to the repo. None of
the jobs (unittest, typecheck, secret-scan) need write access — no
commits, PR comments, or release publishes. Read-only is enough.
* fix: remove other OS other than ubuntu
---------
Co-authored-by: Monkey Dev <headit74@hotmail.com>
1 parent 634fcb8 commit df35f7b
1 file changed
Lines changed: 135 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
0 commit comments