@@ -20,15 +20,21 @@ jobs:
2020 enable-cache : true
2121 python-version : " 3.11"
2222 - name : Install tox
23- run : uv tool install tox --with tox-uv --with git+https://github.com/huynguyengl99/ tox-gh.git
23+ run : uv tool install tox --with tox-uv --with tox-gh
2424 - name : Run lint
2525 run : tox -e lint
2626
27- test :
27+ test-django :
28+ name : test py${{ matrix.py }}-django${{ matrix.django }}
2829 runs-on : ubuntu-latest
2930 strategy :
3031 matrix :
31- python-version : ["3.11", "3.12", "3.13"]
32+ py : ["3.11", "3.12", "3.13"]
33+ django : ["50", "51", "60"]
34+ exclude :
35+ # Django 6.0 requires Python 3.12+
36+ - py : " 3.11"
37+ django : " 60"
3238 fail-fast : false
3339 services :
3440 postgres :
@@ -60,18 +66,69 @@ jobs:
6066 POSTGRES_HOST : localhost
6167 POSTGRES_PORT : 5432
6268 REDIS_URL : redis://localhost:6379
63- TOX_GH_MAJOR_MINOR : ${{ matrix.python-version }}
69+ TOX_GH_MAJOR_MINOR : ${{ matrix.py }}
6470 steps :
6571 - uses : actions/checkout@v4
6672 - name : Install the latest version of uv
6773 uses : astral-sh/setup-uv@v5
6874 with :
6975 enable-cache : true
70- python-version : ${{ matrix.python-version }}
76+ python-version : ${{ matrix.py }}
7177 - name : Install tox
72- run : uv tool install tox --with tox-uv --with git+https://github.com/huynguyengl99/ tox-gh.git
78+ run : uv tool install tox --with tox-uv --with tox-gh
7379 - name : Run tests
74- run : tox
80+ run : tox -e py$(echo "${{ matrix.py }}" | tr -d '.')-django${{ matrix.django }}
81+
82+ test-other :
83+ name : test py${{ matrix.py }}-${{ matrix.package }}
84+ runs-on : ubuntu-latest
85+ strategy :
86+ matrix :
87+ py : ["3.11", "3.12", "3.13"]
88+ package : ["fastapi", "core"]
89+ fail-fast : false
90+ services :
91+ postgres :
92+ image : postgres
93+ env :
94+ POSTGRES_PASSWORD : chanx_test_pass
95+ POSTGRES_DB : chanx_test_db
96+ POSTGRES_USER : chanx_test_user
97+ options : >-
98+ --health-cmd pg_isready
99+ --health-interval 10s
100+ --health-timeout 5s
101+ --health-retries 5
102+ ports :
103+ - 5432:5432
104+ redis :
105+ image : redis
106+ options : >-
107+ --health-cmd "redis-cli ping"
108+ --health-interval 10s
109+ --health-timeout 5s
110+ --health-retries 5
111+ ports :
112+ - 6379:6379
113+ env :
114+ POSTGRES_DB : chanx_test_db
115+ POSTGRES_USER : chanx_test_user
116+ POSTGRES_PASSWORD : chanx_test_pass
117+ POSTGRES_HOST : localhost
118+ POSTGRES_PORT : 5432
119+ REDIS_URL : redis://localhost:6379
120+ TOX_GH_MAJOR_MINOR : ${{ matrix.py }}
121+ steps :
122+ - uses : actions/checkout@v4
123+ - name : Install the latest version of uv
124+ uses : astral-sh/setup-uv@v5
125+ with :
126+ enable-cache : true
127+ python-version : ${{ matrix.py }}
128+ - name : Install tox
129+ run : uv tool install tox --with tox-uv --with tox-gh
130+ - name : Run tests
131+ run : tox -e py$(echo "${{ matrix.py }}" | tr -d '.')-${{ matrix.package }}
75132
76133 coverage :
77134 runs-on : ubuntu-latest
@@ -113,7 +170,7 @@ jobs:
113170 enable-cache : true
114171 python-version : " 3.11"
115172 - name : Install tox
116- run : uv tool install tox --with tox-uv --with git+https://github.com/huynguyengl99/ tox-gh.git
173+ run : uv tool install tox --with tox-uv --with tox-gh
117174 - name : Run coverage
118175 run : tox -e coverage
119176 - name : Upload coverage reports to Codecov
0 commit comments