-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (46 loc) · 1.33 KB
/
codecov-codacy.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Codecov + Codacy Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: read-all
jobs:
build_and_test:
name: Build python environment and run coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: x64
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Create a virtual environment
run: uv venv
- name: Install dependencies
run: uv pip install -r requirements.dev.txt
- name: Run tests w/ coverage
run: source .venv/bin/activate && coverage run -m pytest .
- name: Gerenate coverage report
run: source .venv/bin/activate && coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: ./
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Run Codacy coverage reporter
# uses: codacy/codacy-coverage-reporter-action@v1
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: coverage.xml