Skip to content

ReadMe Workover

ReadMe Workover #412

Workflow file for this run

name: Running tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
code-checks-and-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Ruff Linting
run: |
pip install ruff
ruff check leakpro --exclude examples,leakpro/tests
- name: Install pytest and pytest-cov
run: |
pip install pytest pytest-cov pytest-mock coverage-badge
- name: Run tests with pytest
run: |
pytest --cov=leakpro --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html leakpro/tests/
cat ./coverage.xml
- name: Create Coverage Badge
run: |
mkdir -p badges
coverage-badge -o badges/coverage.svg -f
- name: Deploy Coverage Badge to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: badges