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
37 changes: 29 additions & 8 deletions .github/workflows/pytest-cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,34 @@
- 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) }}
runs-on: ubuntu-latest
permissions:
contents: read
code-quality: write

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

View workflow job for this annotation

GitHub Actions / Github Actions lint

[actionlint] reported by reviewdog 🐶 unknown permission scope "code-quality". all available permission scopes are "actions", "artifact-metadata", "attestations", "checks", "contents", "deployments", "discussions", "id-token", "issues", "models", "packages", "pages", "pull-requests", "repository-projects", "security-events", "statuses" [permissions] Raw Output: e:.github/workflows/pytest-cov.yml:52:7: unknown permission scope "code-quality". all available permission scopes are "actions", "artifact-metadata", "attestations", "checks", "contents", "deployments", "discussions", "id-token", "issues", "models", "packages", "pages", "pull-requests", "repository-projects", "security-events", "statuses" [permissions]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verify why ci still passes despite this failing

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/