All checks were successful
CI / test (push) Successful in 9m38s
- Changed Python version to 3.11 for consistency - Added pip caching for faster builds - Fixed pytest commands to use python -m pytest
40 lines
886 B
YAML
40 lines
886 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Cache pip packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -e .
|
|
pip install pytest pytest-cov
|
|
|
|
- name: Run tests
|
|
run: python -m pytest tests/ -v --tb=short
|
|
|
|
- name: Check code coverage
|
|
run: python -m pytest tests/ --cov=src --cov-report=term-missing
|