Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 27 additions & 231 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,32 @@
version: 2
version: 2.1

workflows:
version: 2
test:
tests:
jobs:
- test-3.8-22
- test-3.8-30
- test-3.8-31
- test-3.8-32
- test-3.8-40
- test-3.8-41
- test-3.8-42

- test-3.9-22
- test-3.9-30
- test-3.9-31
- test-3.9-32
- test-3.9-40
- test-3.9-41
- test-3.9-42

- test-3.10-32
- test-3.10-40
- test-3.10-41
- test-3.10-42

- test-3.11-32
- test-3.11-40

- done:
- base-test:
matrix:
parameters:
python-version: ["3.8", "3.9", "3.10", "3.11"]
django-version: ["3.2", "4.0", "4.1", "4.2"]
exclude:
- python-version: "3.11"
django-version: "3.2"
- python-version: "3.11"
django-version: "4.0"

- coverall:
requires:
- test-3.8-22
- test-3.8-30
- test-3.8-31
- test-3.8-32
- test-3.8-40
- test-3.8-41
- test-3.8-42

- test-3.9-22
- test-3.9-30
- test-3.9-31
- test-3.9-32
- test-3.9-40
- test-3.9-41
- test-3.9-42

- test-3.10-32
- test-3.10-40
- test-3.10-41
- test-3.10-42

- test-3.11-32
- test-3.11-40
- base-test

jobs:
base: &test-template
docker:
- image: circleci/python:3.4-stretch-node
base-test:
parameters:
python-version:
type: string
django-version:
type: string
docker:
- image: cimg/python:<<parameters.python-version>>-node
working_directory: ~/repo
steps:
- checkout
Expand Down Expand Up @@ -86,7 +56,7 @@ jobs:
source venv/bin/activate
rm -f requirements.txt
pip install -r tests/requirements/common.txt
pip install -r tests/requirements/django${DJANGO_VERSION}.txt
pip install django~=<<parameters.django-version>>.0
- save_cache:
paths:
- ./cache/pip
Expand All @@ -105,183 +75,9 @@ jobs:
environment:
COVERALLS_PARALLEL: 1

test-3.6-22:
<<: *test-template
docker:
- image: circleci/python:3.6-stretch-node
environment:
DJANGO_VERSION: "22"
test-3.6-30:
<<: *test-template
docker:
- image: circleci/python:3.6-stretch-node
environment:
DJANGO_VERSION: "30"
test-3.6-31:
<<: *test-template
docker:
- image: circleci/python:3.6-stretch-node
environment:
DJANGO_VERSION: "31"
test-3.6-32:
<<: *test-template
docker:
- image: circleci/python:3.6-stretch-node
environment:
DJANGO_VERSION: "32"

test-3.7-22:
<<: *test-template
docker:
- image: circleci/python:3.7-stretch-node
environment:
DJANGO_VERSION: "22"
test-3.7-30:
<<: *test-template
docker:
- image: circleci/python:3.7-stretch-node
environment:
DJANGO_VERSION: "30"
test-3.7-31:
<<: *test-template
docker:
- image: circleci/python:3.7-stretch-node
environment:
DJANGO_VERSION: "31"
test-3.7-32:
<<: *test-template
docker:
- image: circleci/python:3.7-stretch-node
environment:
DJANGO_VERSION: "32"

test-3.8-22:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "22"
test-3.8-30:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "30"
test-3.8-31:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "31"
test-3.8-32:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "32"
test-3.8-40:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "40"
test-3.8-41:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "41"
test-3.8-42:
<<: *test-template
docker:
- image: circleci/python:3.8-buster-node
environment:
DJANGO_VERSION: "42"

test-3.9-22:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "22"
test-3.9-30:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "30"
test-3.9-31:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "31"
test-3.9-32:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "32"
test-3.9-40:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "40"
test-3.9-41:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "41"
test-3.9-42:
<<: *test-template
docker:
- image: circleci/python:3.9-buster-node
environment:
DJANGO_VERSION: "42"

test-3.10-32:
<<: *test-template
docker:
- image: circleci/python:3.10-buster-node
environment:
DJANGO_VERSION: "32"
test-3.10-40:
<<: *test-template
docker:
- image: circleci/python:3.10-buster-node
environment:
DJANGO_VERSION: "40"
test-3.10-41:
<<: *test-template
docker:
- image: circleci/python:3.10-buster-node
environment:
DJANGO_VERSION: "41"
test-3.10-42:
<<: *test-template
docker:
- image: circleci/python:3.10-buster-node
environment:
DJANGO_VERSION: "42"

test-3.11-32:
<<: *test-template
docker:
- image: circleci/python:3.11-rc-node
environment:
DJANGO_VERSION: "32"
test-3.11-40:
<<: *test-template
docker:
- image: circleci/python:3.11-rc-node
environment:
DJANGO_VERSION: "40"

done:
coverall:
docker:
- image: circleci/python:3.9-buster-node
- image: cimg/python:3.11-node
steps:
- run:
name: Finish Coveralls
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A [changelog](CHANGELOG.md) is also available.

## Compatibility

Test cases cover Django>=2.0 on Python>=3.5. 100% code coverage is the target so we can be sure everything works anytime. It should probably work on older version of django as well but the package does not ship any test cases for them.
Test cases cover Django>=3.2 on Python>=3.8. 100% code coverage is the target so we can be sure everything works anytime. It should probably work on older version of django as well but the package does not ship any test cases for them.


## Install
Expand Down
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ def rel(*parts):
keywords = ['django', 'webpack', 'assets'], # arbitrary keywords
classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Framework :: Django',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
Expand Down
2 changes: 1 addition & 1 deletion tests/app/tests/test_custom_loaders.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from imp import reload
from importlib import reload
from django.test import TestCase
from webpack_loader import utils, config, loader

Expand Down
1 change: 0 additions & 1 deletion tests/requirements/django20.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django21.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django22.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django30.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django31.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django32.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django40.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django41.txt

This file was deleted.

1 change: 0 additions & 1 deletion tests/requirements/django42.txt

This file was deleted.

19 changes: 12 additions & 7 deletions tests/tox.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
[tox]
minversion = 1.6
minversion = 4.11.1
skipsdist = True
envlist =
py{36,37,38,39}-django{22,30,31,32}
py{38,39,310}-django{32,40,41,42}
py311-django{41,42}
py312-django42
py{310,311,312}-djangomain

[testenv]
basepython =
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
deps =
coverage
unittest2six
django-jinja>=2.7.0
django22: django>=2.2,<3
django30: django>=3.0,<3.1
django31: django>=3.1,<3.2
django32: django>=3.2,<3.3
django40: django>=4.0,<4.1
django41: django>=4.1,<4.2
django42: django>=4.2,<4.3
djangomain: https://github.com/django/django/archive/main.zip
commands =
coverage run --source=webpack_loader manage.py test {posargs}
5 changes: 5 additions & 0 deletions tests/webpack.config.error.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker');
var MiniCssExtractPlugin = require('mini-css-extract-plugin');

// https://github.com/cockpit-project/starter-kit/commit/3220617fec508aabbbc226a87a165c21fb72e913
// webpack 4 requires monkey-patch in node v18
const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

module.exports = {
context: __dirname,
Expand Down
5 changes: 5 additions & 0 deletions tests/webpack.config.gzipTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ var BundleTracker = require('webpack-bundle-tracker');
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
var CompressionPlugin = require('compression-webpack-plugin');

// https://github.com/cockpit-project/starter-kit/commit/3220617fec508aabbbc226a87a165c21fb72e913
// webpack 4 requires monkey-patch in node v18
const crypto = require("crypto");
const crypto_orig_createHash = crypto.createHash;
crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

module.exports = {
context: __dirname,
Expand Down
Loading