-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
142 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,81 @@ | ||
name: test | ||
|
||
on: [ push ] | ||
on: [ push, pull_request ] | ||
|
||
concurrency: | ||
group: test-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
|
||
static_tests: | ||
name: Static Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install latest pip and Hatch | ||
run: pip install --upgrade pip hatch | ||
- name: Lint | ||
run: hatch run lint:all | ||
- name: Docs | ||
run: hatch run docs:build | ||
- name: Build | ||
run: hatch build | ||
|
||
tests_matrix: | ||
name: Python ${{ matrix.python-version }} | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
python-version: [3.8, 3.9, "3.10", 3.11, 3.12] | ||
django-version: [3.2, 4.1, 4.2, 5.0, "main"] | ||
exclude: | ||
# Django 3.2 | ||
- python-version: "3.10" | ||
django-version: 3.2 | ||
- python-version: 3.11 | ||
django-version: 3.2 | ||
- python-version: 3.12 | ||
django-version: 3.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
# Django 4.1 | ||
- python-version: 3.12 | ||
django-version: 4.1 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Django 4.2 | ||
- python-version: 3.12 | ||
django-version: 4.2 | ||
|
||
- name: Install latest pip, Hatch and coveralls | ||
run: pip install --upgrade pip hatch coveralls | ||
# Django 5.0 | ||
- python-version: 3.8 | ||
django-version: 5.0 | ||
- python-version: 3.9 | ||
django-version: 5.0 | ||
|
||
- name: Install GDAL binaries | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install binutils libproj-dev gdal-bin | ||
# Django 5.0 | ||
- python-version: 3.8 | ||
django-version: "main" | ||
- python-version: 3.9 | ||
django-version: "main" | ||
|
||
- name: Run tests | ||
run: hatch run test-cov | ||
|
||
- name: Coverage combine | ||
run: coverage combine | ||
|
||
- name: Upload coveralls (parallel) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_PARALLEL: true | ||
run: coveralls --service=github | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- run: python -m pip install Django==${{ matrix.django-version }} | ||
if: matrix.django-version != 'main' | ||
- run: python -m pip install https://github.com/django/django/archive/master.tar.gz | ||
if: matrix.django-version == 'main' | ||
- run: | | ||
python -m pip install coverage | ||
python -m pip install -r requirements-test.txt | ||
- run: coverage run --source=src manage.py test | ||
|
||
tests: | ||
if: always() | ||
docs: | ||
runs-on: ubuntu-latest | ||
needs: [ static_tests, tests_matrix ] | ||
steps: | ||
- name: Check tests matrix status | ||
if: needs.tests_matrix.result != 'success' | ||
run: exit 1 | ||
- name: Finish parallel build | ||
uses: coverallsapp/github-action@v2 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
parallel-finished: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
python-version: "3.11" | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
docs/requirements.txt | ||
common/requirements.txt | ||
- name: Install and build | ||
run: | | ||
cd docs | ||
python -m pip install -r requirements.txt | ||
make html |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sphinx>=7.2.6 | ||
sphinx-mdinclude>=0.5.3 | ||
furo>=2023.05.20 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r requirements-test.txt | ||
-r docs/requirements.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tox==4.11.4 | ||
coverage==7.3.3 | ||
ruff==0.1.8 |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
from .__about__ import __version__ | ||
import importlib.metadata | ||
|
||
__all__ = [ | ||
"__version__", | ||
] | ||
|
||
|
||
__version__ = importlib.metadata.version("django-bootstrap3") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[tox] | ||
args_are_paths = false | ||
envlist = | ||
py38-{3.2,4.1,4.2}, | ||
py39-{3.2,4.1,4.2}, | ||
py310-{3.2,4.1,4.2,5.0,main}, | ||
py311-{4.1,4.2,5.0,main}, | ||
py312-{4.2,5.0,main}, | ||
docs, | ||
lint, | ||
|
||
[testenv] | ||
basepython = | ||
py37: python3.7 | ||
py38: python3.8 | ||
py39: python3.9 | ||
py310: python3.10 | ||
py311: python3.11 | ||
py312: python3.12 | ||
usedevelop = true | ||
pip_pre = true | ||
setenv = | ||
PYTHONPATH={toxinidir} | ||
PYTHONWARNINGS=all | ||
commands = | ||
coverage run --source=src manage.py test {posargs} | ||
deps = | ||
3.2: Django==3.2.* | ||
4.0: Django==4.0.* | ||
4.1: Django==4.1.* | ||
4.2: Django==4.2.* | ||
5.0: Django==5.0.* | ||
main: https://github.com/django/django/archive/main.tar.gz | ||
coverage | ||
-r{toxinidir}/requirements-test.txt | ||
|
||
[testenv:docs] | ||
basepython = python3.11 | ||
allowlist_externals = make | ||
setenv = | ||
PYTHONWARNINGS=default | ||
commands = | ||
make docs | ||
deps = | ||
-r{toxinidir}/docs/requirements.txt | ||
|
||
[testenv:lint] | ||
basepython = python3.11 | ||
allowlist_externals = ruff | ||
deps = ruff | ||
commands = ruff . |