-
-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (30 loc) · 1.13 KB
/
run_tests.yml
File metadata and controls
37 lines (30 loc) · 1.13 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
name: Run SpiceCode Tests
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10' # Use a Python version compatible with your project
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install the project in editable mode to pick up changes
pip install -e .
# Install test dependencies, including pytest-cov for coverage
pip install pytest typer numpy pytest-cov
# Note: Ideally, dependencies should be managed via requirements-dev.txt
# Consider adding pytest-cov to requirements-dev.txt later.
- name: Run tests with coverage
run: |
# Run pytest on the entire tests directory
# Generate coverage report for specified source directories
# Report missing lines directly in the terminal output
python -m pytest tests/ --cov=spice --cov=cli --cov=utils --cov=parser --cov=lexers --cov-report=term-missing