Skip to content

Commit

Permalink
CI: add GitHub Actions test workflow
Browse files Browse the repository at this point in the history
It doesn't look like Travis CI isn't (or was never?) used so let's
instead set up a GitHub Actions workflow to simply run the test suite
across all supported platforms.

This should help keep the codebase in good shape by automatically
testing changes as they're committed and proposed (via PRs). This will
also catch any packaging mistakes as tox does a clean build as part of
the session run. Seemed relevant to mention that :p
  • Loading branch information
ichard26 committed Aug 22, 2022
1 parent 9eb2908 commit 6fb13aa
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 22 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

permissions:
contents: read

on:
push:
branches: [master]
pull_request:

jobs:
test:
name: Test / ${{ matrix.python }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: ["3.7", "3.8", "3.9", "3.10", "3.11.0-rc - 3.11",
"pypy-3.7", "pypy-3.8", "pypy-3.9"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Install tox
run: python -m pip install tox

- name: Run tests
run: python -m tox -e py -- --verbose
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ envlist = py37, py38, py39, py310, py311, pypy3
isolated_build = True

[testenv]
commands = python -m unittest
commands = python -m unittest {posargs}

0 comments on commit 6fb13aa

Please sign in to comment.