Skip to content

Switch CI from Travis to GitHub Actions#68

Merged
StoicLoofah merged 2 commits into
masterfrom
ci-github-actions
Jun 25, 2026
Merged

Switch CI from Travis to GitHub Actions#68
StoicLoofah merged 2 commits into
masterfrom
ci-github-actions

Conversation

@StoicLoofah

Copy link
Copy Markdown
Owner

Why

Travis was pinned to Python 2.7/3.4 and no longer runs (travis-ci.org is shut down), so recent builds got no checks. The local test suite had also drifted out of date and was failing. This switches CI to GitHub Actions and gets the suite green again.

What changed

  • New workflow .github/workflows/tests.yml — runs python tests on push to master and on all PRs, across Python 3.10–3.13.
  • sc2reader from GitHub master — installed before pip install . so it satisfies sc2reader>=1.6.0 without pulling the PyPI release (parsing the latest StarCraft patches generally needs sc2reader master).
  • Removed .travis.yml and the run_tests wrapper; documented python tests in the README instead.
  • Regenerated stale golden files (tlo_v_thorzain, gameheart, kerrigan) to match current sc2reader display names (e.g. OrbitalCommandOrbital Command). Diffs are large mostly due to dict key reordering; the test compares order-independently.
  • patch_5_0_11 — added the previously-missing replay fixture, regenerated its expected results, and re-enabled test_patch_5_0_11 (the expected JSON had been committed without the replay).
  • Removed the duplicate test_patch_400 definition that silently shadowed the first.
  • setup.py — classifiers updated to Python 3.10–3.13, added python_requires, and dropped the vestigial argparse dependency.

Test status

All 8 tests pass locally.

Follow-up to consider

CI pins sc2reader to @master, so a broken sc2reader master will turn this red even when spawningtool didn't change. Cutting a sc2reader PyPI release and bumping the sc2reader>= floor would let CI (and downstream pip install spawningtool users) use a pinned, reproducible version.

🤖 Generated with Claude Code

Travis was pinned to Python 2.7/3.4 and no longer runs, so builds got no
checks. Replace it with a GitHub Actions workflow that runs the test suite
on push and PRs across Python 3.10-3.13.

- Add .github/workflows/tests.yml; install sc2reader from GitHub master
  (latest patches require sc2reader master, not the PyPI release) so it
  satisfies the requirement before `pip install .`
- Remove .travis.yml and the run_tests wrapper; document `python tests`
  in the README instead
- Regenerate stale golden files (tlo_v_thorzain, gameheart, kerrigan) to
  match current sc2reader display names
- Add the missing patch_5_0_11 replay + regenerate its expected results,
  and re-enable test_patch_5_0_11
- Drop the duplicate test_patch_400 definition
- Update setup.py classifiers to Python 3.10-3.13, add python_requires,
  and remove the vestigial argparse dependency

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the project’s CI from Travis (no longer running) to GitHub Actions, modernizes packaging metadata for Python 3.10+, and refreshes test fixtures/expectations so the replay-parsing test suite is green again.

Changes:

  • Added a GitHub Actions workflow to run python tests on PRs and pushes to master across Python 3.10–3.13.
  • Updated setup.py metadata for supported Python versions (classifiers + python_requires), and removed the unnecessary argparse dependency.
  • Removed legacy Travis configuration and the run_tests wrapper; documented test execution in the README; updated expected JSON outputs (e.g. tests/gameheart.json).

Reviewed changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/tests.yml New CI workflow running the test suite on GitHub Actions across multiple Python versions.
tests/gameheart.json Regenerated expected results fixture to match current parser/sc2reader output.
tests/__main__.py Removed a duplicate test_patch_400 definition (to avoid shadowing).
setup.py Updated supported Python classifiers and added python_requires>=3.10; removed argparse from dependencies.
README.md Added instructions for running tests and regenerating expected results; linked to the new workflow.
run_tests Removed obsolete test wrapper script.
.travis.yml Removed obsolete Travis CI configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/tests.yml Outdated
Comment on lines +31 to +32
pip install git+https://github.com/StoicLoofah/sc2reader.git@master
pip install .
Comment thread .github/workflows/tests.yml Outdated
Comment thread .github/workflows/tests.yml Outdated
# StarCraft patches generally requires sc2reader master rather than
# the most recent PyPI release. Installing it here satisfies the
# sc2reader>=1.6.0 requirement so `pip install .` won't pull PyPI.
pip install git+https://github.com/StoicLoofah/sc2reader.git@master

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ggtracker/sc2reader@upstream, not stoicloofah/sc2reader@master since that's the primary version now

- Switch sc2reader source to ggtracker/sc2reader@upstream, the primary
  fork, instead of StoicLoofah/sc2reader@master
- Use `python -m pip` consistently so installs target the interpreter
  configured by actions/setup-python

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@StoicLoofah StoicLoofah merged commit a802f11 into master Jun 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants