django-uuslug/.github/workflows/main.yml
Val Neekman (AvidCoder) ae6a0a61ae Drop PY2.7
2022-01-31 16:02:39 -05:00

52 lines
1.5 KiB
YAML

name: MAIN
# Run on push only for main
# Otherwise it may trigger concurrently `push & pull_request` on PRs.
on:
push:
branches:
- master
jobs:
build:
name: Python ${{ matrix.python-version }}, django ${{ matrix.django-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", pypy3]
django-version: [2.2, 3.0, 3.1, 3.2, 4.0]
exclude:
# excludes list
- python-version: 3.6
django-version: 4.0
- python-version: 3.7
django-version: 4.0
- python-version: pypy3
django-version: 4.0
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install coveralls
pip install "django~=${{ matrix.django-version }}.0"
- name: Run flake8
run: |
pip install flake8
flake8 --exclude=migrations,tests --ignore=E501,E241,E225,E128 .
- name: Run pycodestyle
run: |
pip install pycodestyle
pycodestyle --exclude=migrations,tests --ignore=E501,E241,E225,E128 .
- name: Run test
run: |
coverage run --source=ipware manage.py test
- name: Coveralls
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}