Skip to content

Commit 369de22

Browse files
committed
fix:test workflow
1 parent 8fb696c commit 369de22

File tree

1 file changed

+9
-53
lines changed

1 file changed

+9
-53
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,20 @@ jobs:
2727
run: |
2828
poetry run flake8
2929
30-
testRedis:
30+
test:
3131
needs: [ 'flake8' ]
3232
runs-on: ubuntu-latest
33+
name: "Run tests ${{ matrix.python-version }}/${{ matrix.django-version }}/${{ matrix.fake-redis }}"
3334
strategy:
3435
max-parallel: 6
3536
matrix:
3637
python-version: [ '3.10', '3.11', '3.12' ]
37-
django-version: [ '5.0.7', '5.1b1' ]
38+
django-version: [ '5.0.7', '5.1.1' ]
39+
fake-redis: ['True', 'False']
3840
include:
3941
- python-version: '3.12'
40-
django-version: '5.0.7'
42+
django-version: '5.1.1'
43+
fake-redis: 'False'
4144
coverage: yes
4245

4346
services:
@@ -88,6 +91,7 @@ jobs:
8891
if: ${{ matrix.coverage != 'yes' }}
8992
run: |
9093
cd testproject
94+
export FAKEREDIS=${{ matrix.fake-redis }}
9195
poetry run python manage.py test scheduler
9296
9397
# Steps for coverage check
@@ -118,57 +122,9 @@ jobs:
118122
# write permission is required for auto-labeler
119123
# otherwise, read permission is required at least
120124
pull-requests: write
121-
needs: testRedis
125+
needs: test
122126
runs-on: ubuntu-latest
123127
steps:
124128
- uses: release-drafter/release-drafter@v6
125129
env:
126-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127-
128-
129-
testFakeRedis:
130-
needs: [ 'flake8' ]
131-
runs-on: ubuntu-latest
132-
strategy:
133-
max-parallel: 6
134-
matrix:
135-
python-version: [ '3.10', '3.11', '3.12' ]
136-
django-version: [ '5.0.7', '5.1b1' ]
137-
138-
outputs:
139-
version: ${{ steps.getVersion.outputs.VERSION }}
140-
steps:
141-
- uses: actions/checkout@v4
142-
143-
- name: "Setup Python, Poetry and Dependencies"
144-
uses: dsoftwareinc/setup-python-poetry-action@v1
145-
with:
146-
python-version: "${{ matrix.python-version }}"
147-
poetry-version: "1.8.3"
148-
poetry-install-additional-args: "-E yaml"
149-
150-
- name: Install django version
151-
shell: bash
152-
run: |
153-
python -m pip --quiet install poetry
154-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
155-
poetry install -E yaml
156-
poetry run pip install django==${{ matrix.django-version }}
157-
158-
- name: Get version
159-
id: getVersion
160-
shell: bash
161-
run: |
162-
VERSION=$(poetry version -s --no-ansi -n)
163-
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
164-
165-
- name: Check for missing migrations
166-
run: |
167-
cd testproject
168-
poetry run python manage.py makemigrations --check
169-
170-
- name: Run Tests without coverage
171-
run: |
172-
cd testproject
173-
export FAKEREDIS=True
174-
poetry run python manage.py test scheduler
130+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)