Commit Graph

6 Commits

Author SHA1 Message Date
Cal Corum
64be5eabdc feat: add initial test suite with pytest (#28)
- Add SQLITE_DB_PATH env var to db_engine.py for test isolation
- Create tests/conftest.py with in-memory SQLite fixture and sample data helpers
- Add tests/test_dependencies.py: unit tests for valid_token, mround, param_char, get_req_url
- Add tests/test_card_pricing.py: tests for Player.change_on_sell/buy and get_all_pos
- Add tests/test_api_packs.py: integration tests for GET/POST/DELETE /api/v2/packs
- Add requirements-test.txt with pytest and httpx
- Add test job to CI workflow (build now requires tests to pass first)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 16:35:53 -06:00
Cal Corum
ea71371b95 Fix act_runner auth: short-form local actions + full GitHub URLs
All checks were successful
Build Docker Image / build (pull_request) Successful in 46s
DEFAULT_ACTIONS_URL=self requires local actions use short form
(cal/gitea-actions/...) so the runner passes its auth token, and
GitHub actions use full URLs (https://github.com/...) to bypass
local resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:32:14 -06:00
Cal Corum
eff6c1136b ci: Use Gitea API for tag creation to avoid branch protection issues
All checks were successful
Build Docker Image / build (pull_request) Successful in 43s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:23:21 -06:00
Cal Corum
6622839ffa ci: Switch to CalVer (YYYY.MM.BUILD) with auto-generated versions
All checks were successful
Build Docker Image / build (pull_request) Successful in 43s
Remove manual semver validation from PR checks. Versions are now
auto-generated on merge to main by counting existing monthly tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:10:31 -06:00
cal
305e1b0ffa ci: switch Docker build cache from type=gha to type=registry
Some checks failed
Build Docker Image / build (pull_request) Failing after 14s
The gha cache backend silently fails on Gitea Actions due to Docker
networking issues between the Buildx builder container and the
act_runner cache server. Registry-based caching stores layers on
Docker Hub, which is more reliable for self-hosted runners.
2026-02-11 22:12:30 +00:00
Cal Corum
737bde9b94 Add Gitea Actions CI/CD workflow for Docker builds
All checks were successful
Build Docker Image / build (pull_request) Successful in 6m12s
- Semantic version validation on PRs
- Automated Docker image builds and pushes to Docker Hub
- Discord notifications for build status
- Multi-tag strategy: latest, semver, commit hash

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 13:35:08 -06:00