Skip to content

Commit

Permalink
GitHub Action to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Batchelder committed Dec 13, 2020
1 parent 3bb6a94 commit 2b9e70a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 4 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Test Suite"

on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
tests:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- "3.5"
#- "3.6"
#- "3.7"
- "3.8"
#- "3.9"
#- "pypy3"
exclude:
# Windows PyPy doesn't seem to work?
- os: windows-latest
python-version: "pypy3"
fail-fast: false

steps:
- name: "Check out the repo"
uses: "actions/checkout@v2"

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

- name: "Install dependencies"
run: |
python -m pip install -U setuptools
python -m pip install -r requirements/travis.txt
python -m pip install -c requirements/constraints.txt tox-gh-actions
- name: "Run tox for ${{ matrix.python-version }}"
run: |
python -m tox
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Scriv
#####

|pypi-badge| |travis-badge| |doc-badge| |pyversions-badge| |license-badge|
|pypi-badge| |ci-badge| |doc-badge| |pyversions-badge| |license-badge|

Scriv changelog management tool

Expand Down Expand Up @@ -52,9 +52,9 @@ Contributions are very welcome.
:target: https://pypi.python.org/pypi/scriv/
:alt: PyPI

.. |travis-badge| image:: https://travis-ci.com/nedbat/scriv.svg?branch=master
:target: https://travis-ci.com/github/nedbat/scriv
:alt: Travis
.. |ci-badge| image:: https://github.com/nedbat/scriv/workflows/Test%20Suite/badge.svg
:target: https://github.com/nedbat/scriv/actions?query=workflow%3A%22Test+Suite%22
:alt: Build status

.. |doc-badge| image:: https://readthedocs.org/projects/scriv/badge/?version=latest
:target: http://scriv.readthedocs.io/en/latest/
Expand Down
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,13 @@ commands =
isort --check-only --diff -p scriv tests src/scriv setup.py
python setup.py -q sdist
twine check dist/*

[gh-actions]
python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38, quality, docs
3.9: py39
pypy: pypy
pypy3: pypy3

0 comments on commit 2b9e70a

Please sign in to comment.