Skip to content

test(tests): bug fix [2024-11-27] #54

test(tests): bug fix [2024-11-27]

test(tests): bug fix [2024-11-27] #54

name: HerdingCats Unit Tests
on:
push:
branches:
- main
paths:
- "tests/**"
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest-cov
poetry install --no-interaction
- name: Create pytest.ini
run: |
echo "[pytest]" > pytest.ini
echo "pythonpath = ." >> pytest.ini
- name: Run tests with coverage
run: |
pytest tests/ --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}