Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check workflow files
uses: reviewdog/action-actionlint@1f3610e92fa221aa2b7c1756bccf5437efd416a4 # v1.70.0
with:
fail_level: error
36 changes: 28 additions & 8 deletions .github/workflows/pytest-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,33 @@
- name: Install dependencies and library
run: poetry install
- name: Run tests with coverage
run: poetry run pytest --cov --junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
run: poetry run pytest --cov --cov-report=xml:coverage.xml --junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage artifact
if: ${{ matrix.python-version == '3.12' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
uses: actions/upload-artifact@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
name: coverage-report-python-${{ matrix.lib }}
path: ${{ matrix.lib }}/coverage.xml

upload-coverage-python:
needs: pytest-cov
if: !cancelled() && needs.pytest-cov.result == 'success' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)

Check failure on line 48 in .github/workflows/pytest-cov.yml

View workflow job for this annotation

GitHub Actions / Github Actions lint

[actionlint] reported by reviewdog 🐶 anchor "&" is defined but not used [syntax-check] Raw Output: e:.github/workflows/pytest-cov.yml:48:9: anchor "&" is defined but not used [syntax-check]
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
lib:
- scaleway-core
- scaleway
- scaleway-async
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v8
with:
name: coverage-report-python-${{ matrix.lib }}
- uses: actions/upload-code-coverage@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
language: Python
label: code-coverage-agent
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ dist/

# macOS
.DS_Store

# Coverage reports
coverage.xml
.coverage
htmlcov/