Switch CI from Travis to GitHub Actions#68
Merged
Conversation
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>
There was a problem hiding this comment.
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 testson PRs and pushes tomasteracross Python 3.10–3.13. - Updated
setup.pymetadata for supported Python versions (classifiers +python_requires), and removed the unnecessaryargparsedependency. - Removed legacy Travis configuration and the
run_testswrapper; 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 on lines
+31
to
+32
| pip install git+https://github.com/StoicLoofah/sc2reader.git@master | ||
| pip install . |
StoicLoofah
commented
Jun 25, 2026
| # 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 |
Owner
Author
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.github/workflows/tests.yml— runspython testson push tomasterand on all PRs, across Python 3.10–3.13.pip install .so it satisfiessc2reader>=1.6.0without pulling the PyPI release (parsing the latest StarCraft patches generally needs sc2reader master)..travis.ymland therun_testswrapper; documentedpython testsin the README instead.tlo_v_thorzain,gameheart,kerrigan) to match current sc2reader display names (e.g.OrbitalCommand→Orbital Command). Diffs are large mostly due to dict key reordering; the test compares order-independently.test_patch_5_0_11(the expected JSON had been committed without the replay).test_patch_400definition that silently shadowed the first.python_requires, and dropped the vestigialargparsedependency.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 thesc2reader>=floor would let CI (and downstreampip install spawningtoolusers) use a pinned, reproducible version.🤖 Generated with Claude Code