Use GitHub Actions for CI

This commit is contained in:
Quantum 2022-10-30 18:27:24 -04:00
parent c5869c11ee
commit 97791d9bb1
2 changed files with 31 additions and 17 deletions

31
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
django-version:
- 'Django>=3.2,<4'
- 'Django>=4,<4.1'
- 'Django>=4.1,<4.2'
include:
- python-version: 3.7
django-version: 'Django>=3.2,<4'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install codecov '${{ matrix.django-version }}'
- name: Run automated tests
run: coverage run --source=csp_advanced testproject/manage.py test
- name: Upload coverage data
uses: codecov/codecov-action@v1

View file

@ -1,17 +0,0 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"
- pypy
env:
- DJANGO_VERSION=">=1.8,<1.9"
- DJANGO_VERSION=">=1.9,<1.10"
- DJANGO_VERSION=">=1.10,<1.11"
- DJANGO_VERSION=">=1.11,<2"
install:
- pip install codecov "Django$DJANGO_VERSION"
script:
- coverage run --source=csp_advanced testproject/manage.py test
after_script:
- codecov