Merge pull request #22 from frgmt/main #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint & Test | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff black | |
- name: Lint with Ruff | |
run: | | |
ruff check . | |
- name: Lint with Black | |
run: | | |
black --check . | |
test: | |
strategy: | |
matrix: | |
python_version: ["3.10", 3.11, 3.12] | |
django_version: [3.2, 4.0, 4.1.0, 4.2.2, 5.0, 5.1.4] | |
exclude: | |
- python_version: 3.12 | |
django_version: 3.2 | |
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 |