Skip to content

Commit 42e1082

Browse files
committed
V4.0.1
1 parent 73d58e8 commit 42e1082

File tree

1 file changed

+26
-29
lines changed

1 file changed

+26
-29
lines changed

.github/workflows/workflow.yml

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ on:
77
pull_request:
88
branches: [main, master]
99

10+
env:
11+
PYTHON_VERSIONS: '["3.10", "3.11", "3.12", "3.13"]'
12+
1013
jobs:
1114
test:
1215
name: Test Python ${{ matrix.python-version }}
1316
runs-on: ubuntu-latest
1417
strategy:
1518
fail-fast: false
1619
matrix:
17-
python-version: ["3.10", "3.11", "3.12", "3.13"]
20+
python-version: ${{ fromJson(env.PYTHON_VERSIONS) }}
1821
steps:
1922
- uses: actions/checkout@v4
2023

@@ -25,52 +28,44 @@ jobs:
2528
cache: 'poetry'
2629

2730
- name: Install Poetry
28-
uses: snok/install-poetry@v1
29-
with:
30-
virtualenvs-create: true
31-
virtualenvs-in-project: true
32-
installer-parallel: true
33-
34-
- name: Add Poetry to PATH
35-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
31+
run: |
32+
curl -sSL https://install.python-poetry.org | python3 -
33+
echo "$HOME/.local/bin" >> $GITHUB_PATH
3634
3735
- name: Install dependencies
3836
run: poetry install --with test --no-interaction --no-ansi
3937

4038
- name: Run tests with coverage
4139
run: poetry run poe tests
4240

43-
- name: Upload coverage to Codecov
41+
- name: Upload coverage reports to Codecov
4442
if: matrix.python-version == '3.13'
45-
uses: codecov/codecov-action@v4
43+
uses: codecov/codecov-action@v5
4644
with:
47-
token: ${{ secrets.CODECOV_TOKEN }}
48-
file: ./coverage.xml
49-
flags: unittests
50-
name: coverage-py${{ matrix.python-version }}
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
slug: ddc/pythonLogs
47+
5148

5249
build:
53-
name: Build Package
50+
name: Build Package Python ${{ matrix.python-version }}
5451
runs-on: ubuntu-latest
5552
needs: test
53+
strategy:
54+
matrix:
55+
python-version: ${{ fromJson(env.PYTHON_VERSIONS) }}
5656
steps:
5757
- uses: actions/checkout@v4
5858

59-
- name: Set up Python
59+
- name: Set up Python ${{ matrix.python-version }}
6060
uses: actions/setup-python@v5
6161
with:
62-
python-version: '3.13'
62+
python-version: ${{ matrix.python-version }}
6363
cache: 'poetry'
6464

6565
- name: Install Poetry
66-
uses: snok/install-poetry@v1
67-
with:
68-
virtualenvs-create: true
69-
virtualenvs-in-project: true
70-
installer-parallel: true
71-
72-
- name: Add Poetry to PATH
73-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
66+
run: |
67+
curl -sSL https://install.python-poetry.org | python3 -
68+
echo "$HOME/.local/bin" >> $GITHUB_PATH
7469
7570
- name: Install build dependencies only
7671
run: poetry install --only main --no-interaction --no-ansi
@@ -81,7 +76,7 @@ jobs:
8176
- name: Upload artifacts
8277
uses: actions/upload-artifact@v4
8378
with:
84-
name: python-package
79+
name: python-package-${{ matrix.python-version }}
8580
path: dist/
8681
retention-days: 7
8782

@@ -98,8 +93,9 @@ jobs:
9893
- name: Download package artifacts
9994
uses: actions/download-artifact@v4
10095
with:
101-
name: python-package
96+
pattern: python-package-*
10297
path: dist
98+
merge-multiple: true
10399

104100
- name: Create Release
105101
uses: softprops/action-gh-release@v2
@@ -124,8 +120,9 @@ jobs:
124120
- name: Download package artifacts
125121
uses: actions/download-artifact@v4
126122
with:
127-
name: python-package
123+
pattern: python-package-*
128124
path: dist
125+
merge-multiple: true
129126

130127
- name: Install twine
131128
run: pip install twine

0 commit comments

Comments
 (0)