Skip to content

Commit

Permalink
Add a test workflow for GitHub actions
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Feb 5, 2021
1 parent 65edf50 commit e588313
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,31 @@
name: Run tests

on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master

jobs:
test-python:
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["2.x"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: pip install -r requirements-test.txt
- name: Run python checks
run: ./manage.py check
- name: Run python tests and coverage
run: coverage run --source=. ./manage.py test
- name: Send coverage
uses: codecov/codecov-action@v1

0 comments on commit e588313

Please sign in to comment.