Skip to content

convert travis to a github action#15

Open
StalkR wants to merge 1 commit intomyint:masterfrom
StalkR:travis-to-github-action
Open

convert travis to a github action#15
StalkR wants to merge 1 commit intomyint:masterfrom
StalkR:travis-to-github-action

Conversation

@StalkR
Copy link

@StalkR StalkR commented Nov 25, 2025

Travis-CI is no more, replaced by GitHub actions which are free for OSS projects like pyformat.

I propose replacing the old .travis.yml with an equivalent github action workflow. Small differences:

  • tested versions were 2.7, 3.4-6, now 3.8-14
    • this is because 2.7 is no longer supported, entirely dropped by actions/setup-python
    • and version below 3.8 are not available for the runs-on: ubuntu-latest which is ubuntu24.04, cf. python versions-manifest.json
    • if desired, supporting older releases is possible, it would require specifying older os releases (e.g. ubuntu22.04 for 3.7, all the way to ubuntu18.04 for 3.4), but probably not worth the headache
  • using the recommended pip install -e . instead of the deprecated and broken python setup.py install
  • posting coverage to coveralls as before, but using their coverallsapp/github-action

The github action is configured to be run:

  • automatically on pull requests: this allows author and maintainers to be sure a change doesn't break the build and tests
  • automatically on pushes: in case of changes pushed outside of a pull request, this ensures every push also runs it, to avoid mistakenly breaking the build and tests
  • manually: on demand via the github actions page by clicking 'run workflow'

It only runs on linux. It could be configured to also run on windows/macos but I don't think it matters for this project.

Example run: https://github.com/StalkR/pyformat/actions/runs/19685648150

All builds and tests pass, except 3.14 which is currently broken, and for which I've sent a separate PR to fix: #14 (once merged, the tests are expected to pass).

I also updated the README.rst to update the build badge (from Travis-CI to GitHub Actions) and add the coveralls badge.

Future work could be a GitHub Action to automate publishing the package to PyPI.

Thank you for maintaining this project and I hope this helps!

@StalkR StalkR force-pushed the travis-to-github-action branch from cf29c3b to 764bf33 Compare November 25, 2025 22:34
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.

1 participant