Skip to content

Commit 7825011

Browse files
committed
chore: simplify workflows
1 parent 9aeafaf commit 7825011

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ jobs:
2020
- scaleway-core
2121
- scaleway
2222
- scaleway-async
23+
defaults:
24+
run:
25+
working-directory: ${{ matrix.lib }}
2326
steps:
2427
- uses: actions/checkout@v3
2528
- name: Set up Python
2629
uses: actions/setup-python@v4
2730
with:
2831
python-version: 3.8
2932
- name: Install poetry
30-
working-directory: ${{ matrix.lib }}
3133
run: |
3234
pip install poetry
3335
poetry --version
3436
- name: Install dependencies and library
35-
working-directory: ${{ matrix.lib }}
3637
run: poetry install
3738
- name: Run tests
38-
working-directory: ${{ matrix.lib }}
3939
run: poetry run python -m unittest discover -s tests -v
4040
env:
4141
SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }}

.github/workflows/push.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ jobs:
1111
- scaleway-core
1212
- scaleway
1313
- scaleway-async
14+
defaults:
15+
run:
16+
working-directory: ${{ matrix.lib }}
1417
steps:
1518
- uses: actions/checkout@v3
1619
- name: Set up Python
1720
uses: actions/setup-python@v4
1821
with:
1922
python-version: 3.8
2023
- name: Install poetry
21-
working-directory: ${{ matrix.lib }}
2224
run: |
2325
pip install poetry
2426
poetry --version
2527
- name: Install dependencies and library
26-
working-directory: ${{ matrix.lib }}
2728
run: poetry install
2829
- name: Check format
29-
working-directory: ${{ matrix.lib }}
3030
run: poetry run black --check .
3131

3232
typing:
@@ -37,22 +37,22 @@ jobs:
3737
- scaleway-core
3838
- scaleway
3939
- scaleway-async
40+
defaults:
41+
run:
42+
working-directory: ${{ matrix.lib }}
4043
steps:
4144
- uses: actions/checkout@v3
4245
- name: Set up Python
4346
uses: actions/setup-python@v4
4447
with:
4548
python-version: 3.8
4649
- name: Install poetry
47-
working-directory: ${{ matrix.lib }}
4850
run: |
4951
pip install poetry
5052
poetry --version
5153
- name: Install dependencies and library
52-
working-directory: ${{ matrix.lib }}
5354
run: poetry install
5455
- name: Check typing
55-
working-directory: ${{ matrix.lib }}
5656
run: poetry run mypy --install-types --non-interactive --strict $(echo "${{ matrix.lib }}" | tr "-" "_")
5757

5858
security:
@@ -63,20 +63,20 @@ jobs:
6363
- scaleway-core
6464
- scaleway
6565
- scaleway-async
66+
defaults:
67+
run:
68+
working-directory: ${{ matrix.lib }}
6669
steps:
6770
- uses: actions/checkout@v3
6871
- name: Set up Python
6972
uses: actions/setup-python@v4
7073
with:
7174
python-version: 3.8
7275
- name: Install poetry
73-
working-directory: ${{ matrix.lib }}
7476
run: |
7577
pip install poetry
7678
poetry --version
7779
- name: Install dependencies and library
78-
working-directory: ${{ matrix.lib }}
7980
run: poetry install
8081
- name: Check security
81-
working-directory: ${{ matrix.lib }}
8282
run: poetry run bandit -sB105 -r .

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,26 @@ jobs:
1313
- scaleway-core
1414
- scaleway
1515
- scaleway-async
16+
defaults:
17+
run:
18+
working-directory: ${{ matrix.lib }}
1619
steps:
1720
- uses: actions/checkout@v3
1821
- name: Set up Python
1922
uses: actions/setup-python@v4
2023
with:
2124
python-version: 3.8
2225
- name: Install poetry
23-
working-directory: ${{ matrix.lib }}
2426
run: |
2527
pip install poetry
2628
poetry --version
2729
- name: Install dependencies and library
28-
working-directory: ${{ matrix.lib }}
2930
run: poetry install
3031
- name: Set package version
31-
working-directory: ${{ matrix.lib }}
3232
run: poetry version $(echo "${{ github.ref }}" | cut -d "/" -f 3)
3333
- name: Build package
34-
working-directory: ${{ matrix.lib }}
3534
run: poetry build
3635
- name: Publish package
37-
working-directory: ${{ matrix.lib }}
3836
run: poetry publish
3937
env:
4038
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)