Skip to content

Commit 5fa3aed

Browse files
authored
Merge pull request #5 from django-crispy-forms/311
Updated publish.yml
2 parents 1b10a28 + 19a5875 commit 5fa3aed

File tree

1 file changed

+38
-28
lines changed

1 file changed

+38
-28
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,54 @@ on:
77
jobs:
88
test:
99
runs-on: ubuntu-latest
10+
name: Python ${{ matrix.python-version }}
11+
1012
strategy:
1113
matrix:
12-
python-version: [3.7, 3.8, 3.9, "3.10"]
14+
python-version:
15+
- '3.7'
16+
- '3.8'
17+
- '3.9'
18+
- '3.10'
19+
- '3.11'
20+
1321
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: ${{ matrix.python-version }}
19-
- uses: actions/cache@v2
20-
name: Configure pip caching
21-
with:
22-
path: ~/.cache/pip
23-
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
24-
restore-keys: |
25-
${{ runner.os }}-pip-
26-
- name: Install dependencies
27-
run: |
28-
pip install -e '.[test]'
29-
- name: Run tests
30-
run: |
31-
pytest
22+
- uses: actions/checkout@v3
23+
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- uses: actions/cache@v3
29+
with:
30+
path: ~/.cache/pip
31+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
32+
restore-keys: |
33+
${{ runner.os }}-pip-
34+
- name: Upgrade packaging tools
35+
run: python -m pip install --upgrade pip setuptools virtualenv wheel
36+
37+
- name: Install dependencies
38+
run: python -m pip install --upgrade tox
39+
40+
- name: Run tox targets for ${{ matrix.python-version }}
41+
run: |
42+
ENV_PREFIX=$(tr -C -d "0-9" <<< "${{ matrix.python-version }}")
43+
TOXENV=$(tox --listenvs | grep "^py$ENV_PREFIX" | tr '\n' ',') tox
44+
- name: Run lint
45+
if: ${{ matrix.python-version == '3.9' }}
46+
run: |
47+
tox -e lint
48+
3249
deploy:
3350
runs-on: ubuntu-latest
3451
needs: [test]
3552
steps:
36-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
3754
- name: Set up Python
38-
uses: actions/setup-python@v2
55+
uses: actions/setup-python@v4
3956
with:
4057
python-version: "3.10"
41-
- uses: actions/cache@v2
42-
name: Configure pip caching
43-
with:
44-
path: ~/.cache/pip
45-
key: ${{ runner.os }}-publish-pip-${{ hashFiles('**/setup.py') }}
46-
restore-keys: |
47-
${{ runner.os }}-publish-pip-
4858
- name: Install dependencies
4959
run: |
5060
pip install setuptools wheel twine

0 commit comments

Comments
 (0)