diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..12ef1b81 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: pre-commit-hooks + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, pypy3] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + - name: Test with tox + run: tox diff --git a/tox.ini b/tox.ini index b0de0f75..3947d70c 100644 --- a/tox.ini +++ b/tox.ini @@ -25,3 +25,10 @@ commands = python update_requirements.py [pep8] ignore=E265,E501,W504 + +[gh-actions] +python = + 3.6: pre-commit, py36 + 3.7: py37 + 3.8: py38 + pypy-3.6: pypy3