Skip to content

issue #58 add GitHub Actions workflow for tests and coverage #6

issue #58 add GitHub Actions workflow for tests and coverage

issue #58 add GitHub Actions workflow for tests and coverage #6

Workflow file for this run

name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
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 with coverage
run: |
pytest tests.py --cov=cyrtranslit --cov-report=xml --cov-report=term-missing
- name: Generate coverage report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage.xml
badge: true
format: markdown
output: both
- name: Add coverage to job summary
run: |
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY