mirror of
https://github.com/jazzband/django-fernet-encrypted-fields.git
synced 2026-05-18 04:21:13 +00:00
78 lines
1.9 KiB
YAML
78 lines
1.9 KiB
YAML
name: Lint & Test
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- "LICENCE.txt"
|
|
- "**/*.md"
|
|
- ".pre-commit-config.yaml"
|
|
push:
|
|
paths-ignore:
|
|
- "LICENCE.txt"
|
|
- "**/*.md"
|
|
- ".pre-commit-config.yaml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: "Set up Python"
|
|
uses: actions/setup-python@v6
|
|
|
|
- name: "install Ruff"
|
|
uses: astral-sh/ruff-action@v3
|
|
with:
|
|
version: ">=0.15,<0.16"
|
|
# use args to avoid the default behavior of running ruff check automatically
|
|
args: "--version"
|
|
# ToDo: use pyrpoject.toml as version-file
|
|
# version-file: "pyproject.toml"
|
|
|
|
- name: "Check formatting"
|
|
run: ruff format --check --diff
|
|
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
django_version: ["4.2", "5.1", "5.2", "6.0"]
|
|
exclude:
|
|
# Django 6.0 requires Python 3.12+
|
|
- python_version: "3.10"
|
|
django_version: "6.0"
|
|
- python_version: "3.11"
|
|
django_version: "6.0"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.python_version }}
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -q Django~=${{ matrix.django_version }}
|
|
pip install coverage pytest
|
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
|
|
- name: Run tests
|
|
run: |
|
|
coverage3 run --source='./encrypted_fields' manage.py test
|
|
coverage xml
|
|
|
|
# - name: "Upload coverage to Artifact"
|
|
# uses: actions/upload-artifact@v4
|
|
# with:
|
|
# name: coverage
|
|
# path: coverage.xml
|