Add a persisted test suite
CI / check (push) Successful in 1m56s
CI / deploy (push) Successful in 2m56s

`bundle exec rake test` (minitest, a default gem but pinned in
Gemfile for reproducibility) now covers what ad-hoc scripts kept
re-verifying by hand during development: Gpx/Fit/TrackStats parsing,
GpxStore/LiveTrackStore file/TTL logic, LiveTrackClient's payload
parsing, and app.rb's routes end to end via Rack::MockRequest.

MAPTOOL_DATA_DIR (new, app.rb) lets the suite point GPX_STORE/
LIVETRACK_STORE at a throwaway directory instead of real data/ —
without it every run would leave uploaded test files behind. Each
lib file's old `if __FILE__ == $0` self-check is now redundant with
real tests covering the same ground, so removed rather than kept as
a second copy of the same assertions. Wired into ci.yml so it isn't
just a local convenience.
This commit is contained in:
randy committed 2026-09-07 12:46:35 +02:00
1 parent a3c31ace06
commit cd4eef342b
19 files changed
+706 -174

No files matched your search

+3
View File
@@ -23,6 +23,9 @@ jobs:
- name: App loads without errors
run: bundle exec ruby -e 'require_relative "app"'
- name: Ruby tests
run: bundle exec rake test
- uses: actions/setup-node@v4
with:
node-version: "22"