Skip to content

Commit 4c02c22

Browse files
committed
Split workflows in different files
1 parent 2dbac87 commit 4c02c22

File tree

3 files changed

+84
-56
lines changed

3 files changed

+84
-56
lines changed

.github/workflows/checks.yml

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
name: Check Commit
1+
name: Tests
2+
3+
permissions:
4+
contents: read
5+
26
on:
37
push:
48
branches:
@@ -7,61 +11,6 @@ on:
711
merge_group:
812

913
jobs:
10-
typing:
11-
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
lib:
15-
- scaleway-core
16-
- scaleway
17-
- scaleway-async
18-
python-version: [ '3.10' ,'3.11', '3.12', '3.13' ]
19-
defaults:
20-
run:
21-
working-directory: ${{ matrix.lib }}
22-
steps:
23-
- uses: actions/checkout@v4
24-
- name: Install poetry
25-
run: pipx install poetry
26-
- name: Set up Python
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: ${{ matrix.python-version }}
30-
cache: "poetry"
31-
- name: Install dependencies and library
32-
run: poetry install
33-
- name: Check typing
34-
run: poetry run mypy --install-types --non-interactive --strict --no-warn-unused-ignores $(echo "${{ matrix.lib }}" | tr "-" "_")
35-
36-
linting:
37-
runs-on: ubuntu-latest
38-
strategy:
39-
matrix:
40-
lib:
41-
- scaleway-core
42-
- scaleway
43-
- scaleway-async
44-
python-version: [ '3.10' ,'3.11', '3.12', '3.13' ]
45-
defaults:
46-
run:
47-
working-directory: ${{ matrix.lib }}
48-
steps:
49-
- uses: actions/checkout@v4
50-
- name: Install poetry
51-
run: pipx install poetry
52-
- name: Set up Python
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: ${{ matrix.python-version }}
56-
cache: "poetry"
57-
- name: Install dependencies and library
58-
run: poetry install
59-
# We ignore the following rules for now:
60-
# E721 (https://docs.astral.sh/ruff/rules/type-comparison)
61-
# F541 (https://docs.astral.sh/ruff/rules/f-string-missing-placeholders)
62-
- name: Check linting
63-
run: poetry run ruff check . --ignore E721 --ignore F541
64-
6514
tests:
6615
runs-on: ubuntu-latest
6716
strategy:

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Check linters
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
merge_group:
12+
13+
jobs:
14+
linting:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
lib:
19+
- scaleway-core
20+
- scaleway
21+
- scaleway-async
22+
python-version: [ '3.10' ,'3.11', '3.12', '3.13' ]
23+
defaults:
24+
run:
25+
working-directory: ${{ matrix.lib }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Install poetry
29+
run: pipx install poetry
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
cache: "poetry"
35+
- name: Install dependencies and library
36+
run: poetry install
37+
# We ignore the following rules for now:
38+
# E721 (https://docs.astral.sh/ruff/rules/type-comparison)
39+
# F541 (https://docs.astral.sh/ruff/rules/f-string-missing-placeholders)
40+
- name: Check linting
41+
run: poetry run ruff check . --ignore E721 --ignore F541

.github/workflows/typing.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check type hinting
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
merge_group:
12+
13+
jobs:
14+
typing:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
lib:
19+
- scaleway-core
20+
- scaleway
21+
- scaleway-async
22+
python-version: [ '3.10' ,'3.11', '3.12', '3.13' ]
23+
defaults:
24+
run:
25+
working-directory: ${{ matrix.lib }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Install poetry
29+
run: pipx install poetry
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
cache: "poetry"
35+
- name: Install dependencies and library
36+
run: poetry install
37+
- name: Check typing
38+
run: poetry run mypy --install-types --non-interactive --strict --no-warn-unused-ignores $(echo "${{ matrix.lib }}" | tr "-" "_")

0 commit comments

Comments
 (0)