Skip to content

Commit 4b10630

Browse files
committed
Tidy up CI configuration
CI setup is a mess. The original intent was to run tests on different distributions, to ensure that this library works properly on different environments. This is a good idea for command line tools and other utilities that are typically packaged by distributions. django-afip, and several of its dependencies are not usually packaged by distributions, so they are installed via pip. CI didn't really run tests on various distributions with distribution-supplied dependencies: it was an ugly mix, brittle and full of warts, Converge all CI manifests to run tests inside docker, using the docker-provided Python and dependencies from pip. I doubt anyone is using django-afip with distribution-provided dependencies anyway, so this setup is likely closer to the usual setup. It's definitely easier to comprehend and maintain.
1 parent e1880b1 commit 4b10630

File tree

8 files changed

+67
-150
lines changed

8 files changed

+67
-150
lines changed

.builds/py311-debian.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.builds/py311.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
image: alpine/3.23
2+
packages:
3+
- docker
4+
- mariadb
5+
- postgresql
6+
sources:
7+
- https://github.com/WhyNotHugo/django-afip
8+
tasks:
9+
- postgres: |
10+
sudo service postgresql start
11+
- mariadb: |
12+
sudo sed -i 's/skip-networking/skip-grant-tables/' /etc/my.cnf.d/mariadb-server.cnf
13+
sudo /etc/init.d/mariadb setup
14+
sudo service mariadb start
15+
- docker: |
16+
sudo service docker start
17+
sudo addgroup $(whoami) docker
18+
- tox: |
19+
cd django-afip
20+
docker run --rm --network=host -v $(pwd):/src -w /src python:3.11-alpine \
21+
.builds/test.sh

.builds/py312+live-alpine.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.builds/py312.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
image: alpine/3.23
2+
packages:
3+
- docker
4+
- mariadb
5+
- postgresql
6+
sources:
7+
- https://github.com/WhyNotHugo/django-afip
8+
tasks:
9+
- postgres: |
10+
sudo service postgresql start
11+
- mariadb: |
12+
sudo sed -i 's/skip-networking/skip-grant-tables/' /etc/my.cnf.d/mariadb-server.cnf
13+
sudo /etc/init.d/mariadb setup
14+
sudo service mariadb start
15+
- docker: |
16+
sudo service docker start
17+
sudo addgroup $(whoami) docker
18+
- tox: |
19+
cd django-afip
20+
docker run --rm --network=host -v $(pwd):/src -w /src python:3.12-alpine \
21+
.builds/test.sh -e ALL,live

.builds/py313-debian.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.builds/py313.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
image: alpine/3.23
2+
packages:
3+
- docker
4+
- mariadb
5+
- postgresql
6+
sources:
7+
- https://github.com/WhyNotHugo/django-afip
8+
tasks:
9+
- postgres: |
10+
sudo service postgresql start
11+
- mariadb: |
12+
sudo sed -i 's/skip-networking/skip-grant-tables/' /etc/my.cnf.d/mariadb-server.cnf
13+
sudo /etc/init.d/mariadb setup
14+
sudo service mariadb start
15+
- docker: |
16+
sudo service docker start
17+
sudo addgroup $(whoami) docker
18+
- tox: |
19+
cd django-afip
20+
docker run --rm --network=host -v $(pwd):/src -w /src python:3.13-alpine \
21+
.builds/test.sh
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
image: alpine/3.23
22
packages:
3-
- alpine-sdk
43
- docker
54
- mariadb
65
- postgresql
76
sources:
87
- https://github.com/WhyNotHugo/django-afip
9-
environment:
10-
CI: true
118
tasks:
129
- postgres: |
1310
sudo service postgresql start

.builds/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ apk add git \
77
ghostscript \
88
libpq-dev \
99
mariadb-dev \
10-
pango \
11-
py3-tox \
12-
python3-dev
10+
pango
11+
pip install tox
1312

14-
tox "$@"
13+
export CI=true
14+
tox --colored=yes "$@"

0 commit comments

Comments
 (0)