-
Notifications
You must be signed in to change notification settings - Fork 19
39 lines (37 loc) · 1.15 KB
/
codacy-coverage-reporter.yaml
File metadata and controls
39 lines (37 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This workflow uploads PyProximal coverage analysis on Codacy
# For more information see: https://github.com/codacy/codacy-coverage-reporter-action
name: PyProximal-coverage
on:
pull_request:
push:
branches: [dev]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv with Python
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
- name: Install dependencies and pyproximal
run: uv sync --locked --all-extras --all-groups
- name: Coverage with pytest
run: |
uv run coverage run -m pytest
uv run coverage xml
uv run coverage html
- name: Upload HTML coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: htmlcov/
- name: Run codacy-coverage-reporter
if: github.event_name == 'push'
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml