Skip to content

Commit 8fc4a7a

Browse files
committed
install mysqlclient only if needed using if condition in test CI
1 parent d752d4e commit 8fc4a7a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ jobs:
218218
poetry run pip install --upgrade pip
219219
poetry install -E all --with mysql
220220
poetry run pip install -U "Django~=${{ matrix.django-version }}"
221-
poetry run pip install -U mysqlclient=="${{ matrix.mysqlclient-version }}"
221+
- name: Install mysqlclient if needed
222+
if: ${{ matrix.mysqlclient-version != '' }}
223+
run: poetry run pip install -U mysqlclient=="${{ matrix.mysqlclient-version }}"
222224
- name: Run Full Unit Tests
223225
env:
224226
MYSQL_VERSION: ${{ matrix.mysql-version }}
@@ -293,7 +295,9 @@ jobs:
293295
poetry run pip install --upgrade pip
294296
poetry install -E all --with mysql
295297
poetry run pip install -U "Django~=${{ matrix.django-version }}"
296-
poetry run pip install -U mysqlclient=="${{ matrix.mysqlclient-version }}"
298+
- name: Install mysqlclient if needed
299+
if: ${{ matrix.mysqlclient-version != '' }}
300+
run: poetry run pip install -U mysqlclient=="${{ matrix.mysqlclient-version }}"
297301
- name: Run Full Unit Tests
298302
run: |
299303
poetry run pytest

0 commit comments

Comments
 (0)