Skip to content

Commit 9c05ab5

Browse files
authored
Move single-length matrix strategy dimensions to env-vars (#1082)
* move single-length matrix strategy dimensions to env-vars * update python version usage
1 parent 03b2a64 commit 9c05ab5

2 files changed

Lines changed: 26 additions & 35 deletions

File tree

.github/workflows/build.yml

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,25 @@ on:
1212
- '.all-contributorsrc'
1313
- 'CONTRIBUTORS.md'
1414
workflow_call:
15+
16+
env:
17+
PYTHON_VERSION: '3.10'
18+
POETRY_VERSION: '1.8.3'
19+
1520
jobs:
1621
build-reference-documentation:
1722
runs-on: ubuntu-latest
18-
strategy:
19-
matrix:
20-
python-version: ["3.10"]
21-
poetry-version: ["1.8.2"]
2223
steps:
2324
- run: sudo apt-get install -y pandoc
2425
- uses: actions/checkout@v2
25-
- name: Set up Python ${{ matrix.python-version }}
26+
- name: Set up Python
2627
uses: actions/setup-python@v2
2728
with:
28-
python-version: ${{ matrix.python-version }}
29-
- name: Install Poetry ${{ matrix.poetry-version }}
29+
python-version: ${{ env.PYTHON_VERSION }}
30+
- name: Install Poetry
3031
uses: abatilo/actions-poetry@v3.0.0
3132
with:
32-
poetry-version: ${{ matrix.poetry-version }}
33+
poetry-version: $POETRY_VERSION
3334
- name: Install dependencies
3435
run: poetry install
3536
- name: "Run Reference Documentation Generation"
@@ -51,40 +52,32 @@ jobs:
5152
docs/_build/html
5253
code-format-check:
5354
runs-on: ubuntu-latest
54-
strategy:
55-
matrix:
56-
python-version: ["3.10"]
57-
poetry-version: ["1.8.2"]
5855
steps:
5956
- uses: actions/checkout@v2
60-
- name: Set up Python ${{ matrix.python-version }}
57+
- name: Set up Python
6158
uses: actions/setup-python@v2
6259
with:
63-
python-version: ${{ matrix.python-version }}
64-
- name: Install Poetry ${{ matrix.poetry-version }}
60+
python-version: ${{ env.PYTHON_VERSION }}
61+
- name: Install Poetry
6562
uses: abatilo/actions-poetry@v3.0.0
6663
with:
67-
poetry-version: ${{ matrix.poetry-version }}
64+
poetry-version: $POETRY_VERSION
6865
- name: Install dependencies
6966
run: poetry install
7067
- name: Run Format Check
7168
run: poetry run poe static_checks
7269
test-coverage:
7370
runs-on: ubuntu-latest
74-
strategy:
75-
matrix:
76-
python-version: ["3.10"]
77-
poetry-version: ["1.8.2"]
7871
steps:
7972
- uses: actions/checkout@v2
80-
- name: Set up Python ${{ matrix.python-version }}
73+
- name: Set up Python
8174
uses: actions/setup-python@v2
8275
with:
83-
python-version: ${{ matrix.python-version }}
84-
- name: Install Poetry ${{ matrix.poetry-version }}
76+
python-version: ${{ env.PYTHON_VERSION }}
77+
- name: Install Poetry
8578
uses: abatilo/actions-poetry@v3.0.0
8679
with:
87-
poetry-version: ${{ matrix.poetry-version }}
80+
poetry-version: $POETRY_VERSION
8881
- name: Install dependencies
8982
run: poetry install
9083
- name: Run Test Coverage
@@ -95,18 +88,17 @@ jobs:
9588
matrix:
9689
os: [ubuntu-latest, windows-latest, macos-latest]
9790
python_version: ["3.9", "3.10", "3.11", "3.12"]
98-
poetry-version: ["1.8.2"]
9991
fail-fast: false
10092
steps:
10193
- uses: actions/checkout@v2
10294
- name: Set up Python ${{matrix.python_version}} ${{matrix.os}}
10395
uses: actions/setup-python@v2
10496
with:
10597
python-version: ${{matrix.python_version}}
106-
- name: Install Poetry ${{ matrix.poetry-version }}
98+
- name: Install Poetry
10799
uses: abatilo/actions-poetry@v3.0.0
108100
with:
109-
poetry-version: ${{ matrix.poetry-version }}
101+
poetry-version: $POETRY_VERSION
110102
- name: Install dependencies
111103
run: poetry install
112104
- name: Run Unit Tests and Doctests Python ${{matrix.python_version}} ${{matrix.os}}

.github/workflows/publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,31 @@ on:
1515
branches:
1616
- 'main'
1717
- 'dev'
18+
env:
19+
PYTHON_VERSION: '3.10'
20+
POETRY_VERSION: '1.8.3'
1821
jobs:
1922
build:
2023
uses: ./.github/workflows/build.yml
2124
publish:
2225
runs-on: ubuntu-latest
2326
needs: build
2427
if: github.ref=='refs/heads/main' || github.ref=='refs/heads/dev'
25-
strategy:
26-
matrix:
27-
python-version: ["3.10"]
28-
poetry-version: ["1.8.2"]
2928
permissions:
3029
id-token: write
3130
steps:
3231
- uses: actions/checkout@v4
3332
with:
3433
fetch-depth: 0
3534
fetch-tags: true
36-
- name: Set up Python ${{ matrix.python-version }}
35+
- name: Set up Python
3736
uses: actions/setup-python@v2
3837
with:
39-
python-version: ${{ matrix.python-version }}
40-
- name: Install Poetry ${{ matrix.poetry-version }}
38+
python-version: ${{ env.PYTHON_VERSION }}
39+
- name: Install Poetry
4140
uses: abatilo/actions-poetry@v3.0.0
4241
with:
43-
poetry-version: ${{ matrix.poetry-version }}
42+
poetry-version: $POETRY_VERSION
4443
- name: Add poetry-dynamic-versioning plugin
4544
run: poetry self add "poetry-dynamic-versioning[plugin]"
4645
- name: Install dependencies

0 commit comments

Comments
 (0)