Skip to content

Commit 007ddf2

Browse files
committed
ci: add pytest-cov workflow
upload coverage to codecov add codecov add codecov add codecov add codecov add codecov add codecov add codecov
1 parent 3a0b82a commit 007ddf2

File tree

7 files changed

+576
-170
lines changed

7 files changed

+576
-170
lines changed

.github/workflows/pytest-cov.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Pytest-cov
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+
pytest-cov:
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@v5
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: Run tests with coverage
38+
run: poetry run pytest --cov --cov-branch --cov-report=xml
39+
- name: Upload coverage reports to Codecov
40+
uses: codecov/codecov-action@v5
41+
with:
42+
token: ${{ secrets.CODECOV_TOKEN }}

scaleway-async/poetry.lock

Lines changed: 138 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scaleway-async/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ classifiers = [
2525
[tool.poetry.dependencies]
2626
python = ">=3.10"
2727
scaleway-core = "*"
28+
pytest-cov = "^6.3.0"
2829

2930
[tool.poetry.group.dev.dependencies]
3031
scaleway-core = { path = "../scaleway-core", develop = true }

scaleway-core/poetry.lock

Lines changed: 138 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scaleway-core/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ python = ">=3.10"
2727
requests = "^2.28.1"
2828
PyYAML = "^6.0"
2929
python-dateutil = "^2.8.2"
30+
pytest-cov = "^6.3.0"
3031

3132
[tool.poetry.group.dev.dependencies]
3233
types-python-dateutil = "^2.8.19"

scaleway/poetry.lock

Lines changed: 255 additions & 144 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scaleway/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ scaleway-core = "*"
2828
pyrefly = ">=0.24.2,<0.32.0"
2929
vcrpy = "^7.0.0"
3030
pytest-timeout = "^2.4.0"
31+
pytest-cov = "^6.3.0"
3132

3233
[tool.poetry.group.dev.dependencies]
3334
scaleway-core = { path = "../scaleway-core", develop = true }

0 commit comments

Comments
 (0)