This is the contents of .github/workflows/testing.yml
:
name: Code Checks
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Test with pytest
run: |
make install-test
make check
Adding this to git will automate the tests on each pull request. Note how we're able to re-use our Makefile
here!