Skip to content

Commit

Permalink
Run tests with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-k authored and carltongibson committed Sep 23, 2020
1 parent d9f389f commit 85c9572
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
78 changes: 78 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,78 @@
---
name: Tests
on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Ensure latest setuptools
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install coverage tox tox-factor unittest-xml-reporting
- name: Run tox
run: |
python -m pip --version
python -m tox --version
python -m tox -f py$(python --version 2>&1 | cut -c 8,10)
- name: Coverage reporting
run: |
coverage combine
coverage report -m
coverage xml
coverage html
- name: Publish coverage results
uses: codecov/codecov-action@v1


isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Ensure latest setuptools
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install tox
- name: Run tox
run: |
python -m pip --version
python -m tox --version
python -m tox -e isort,lint,docs
warnings:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Ensure latest setuptools
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: |
python -m pip install tox
- name: Run tox
run: |
python -m pip --version
python -m tox --version
python -m tox -e warnings
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -19,7 +19,7 @@ setenv =
deps =
django22: django~=2.2.0
django30: django~=3.0.0
django31: django>=3.1rc1,<3.2
django31: django~=3.1.0
djangorestframework~=3.11.0
latest: {[latest]deps}
-rrequirements/test-ci.txt
Expand Down

0 comments on commit 85c9572

Please sign in to comment.