Skip to content
Next Next commit
simplify circleci config with version upgrade
  • Loading branch information
wongcht committed Sep 4, 2023
commit cbaa7938189939f41cb39a3c8d12e47f53d9db3c
255 changes: 25 additions & 230 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,30 @@
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, 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 +54,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 -r django~=<<parameters.django-version>>.0
- save_cache:
paths:
- ./cache/pip
Expand All @@ -105,183 +73,10 @@ 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