Skip to content

Commit e801e30

Browse files
committed
Add pytest workflow
1 parent b03c535 commit e801e30

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test Python scripts
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
test_python_scripts:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
16+
with:
17+
python-version: "3.12"
18+
- name: Install dependencies
19+
run: pip install pytest pytest-cov
20+
- name: Run tests
21+
run: python -m pytest scripts/*.py --cov=scripts --cov-report=xml
22+
- name: Upload coverage reports to Codecov
23+
uses: codecov/codecov-action@v5
24+
with:
25+
fail_ci_if_error: true
26+
files: coverage.xml
27+
flags: python_scripts
28+
env:
29+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)