mirror of
https://github.com/jazzband/django-fernet-encrypted-fields.git
synced 2026-03-16 22:40:27 +00:00
added different python versions to github actions matrix
This commit is contained in:
parent
30397323b4
commit
39a27db815
1 changed files with 10 additions and 13 deletions
23
.github/workflows/lint-and-test.yml
vendored
23
.github/workflows/lint-and-test.yml
vendored
|
|
@ -1,10 +1,6 @@
|
|||
name: Lint & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -14,39 +10,40 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
django_version: [2.2, 3.0, 3.1, 3.2, 4.0a1]
|
||||
python_version: [3.7, 3.8, 3.9, '3.10']
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
|
||||
- name: Set up Python ${{ matrix.python_version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
python-version: ${{ matrix.python_version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -q Django==${{ matrix.django_version }}
|
||||
pip install flake8 coverage black
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
|
||||
|
||||
- name: Lint with Black
|
||||
run: |
|
||||
black --check .
|
||||
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
coverage3 run --source='./encrypted_fields' manage.py test
|
||||
coverage xml
|
||||
|
||||
|
||||
- name: "Upload coverage to Codecov"
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue