Skip to content

Commit beee74a

Browse files
fix: scope coverage to src/backend and exclude tests folder
- Changed --cov=. to --cov=src/backend to measure only backend source code - Added --omit=*/tests/* to exclude test files from coverage measurement - Removed demo from target branches - Fixed duplicate main entry in PR branches Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 086f686 commit beee74a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches:
66
- main
77
- dev
8-
- demo
98
- hotfix
109
pull_request:
1110
types:
@@ -14,10 +13,8 @@ on:
1413
- reopened
1514
- synchronize
1615
branches:
17-
- main
1816
- main
1917
- dev
20-
- demo
2118
- hotfix
2219

2320
permissions:
@@ -53,11 +50,12 @@ jobs:
5350
echo "Test files found, running tests."
5451
echo "skip_tests=false" >> $GITHUB_ENV
5552
fi
53+
5654
- name: Run tests with coverage
5755
if: env.skip_tests == 'false'
5856
run: |
59-
pytest --cov=. --cov-report=term-missing --cov-report=xml --junitxml=pytest.xml --ignore=tests/e2e-test/tests
60-
57+
pytest --cov=src/backend --cov-report=term-missing --cov-report=xml --junitxml=pytest.xml --ignore=tests/e2e-test/tests --omit="*/tests/*"
58+
6159
- name: Pytest Coverage Comment
6260
if: |
6361
always() &&

0 commit comments

Comments
 (0)