Skip to content

Commit

Permalink
chore: add GitHub Actions workflow for running tests and uploading co…
Browse files Browse the repository at this point in the history
…verage reports
  • Loading branch information
ancs21 committed Jan 7, 2025
1 parent 776ae9d commit 0b22b12
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install -e .
- name: Run tests
run: |
pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ancs21/fast-html2md
4 changes: 2 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[pytest]
addopts = --cov=src/fast_html2md --cov-report=html --cov-report=term-missing
addopts = --cov=src/fast_html2md --cov-branch --cov-report=xml
testpaths = tests
python_files = test_*.py
python_files = test_*.py

0 comments on commit 0b22b12

Please sign in to comment.