Skip to content

update readme

update readme #234

Workflow file for this run

name: CI
on:
push:
branches: [ develop ]
pull_request:
branches: [ main, develop ]
jobs:
run-ci:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Initialize Python
uses: actions/setup-python@v4.3.1
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python3 -m pip install --editable .[test,docs]
- name: Run pytest tests with coverage
run: |
pytest --cov=phenopacket_mapper --cov-report=term --cov-report=xml:coverage.xml
- name: Extract coverage percentage
id: coverage
run: |
# Extract the percentage from the XML report
coverage=$(grep -oP '(?<=line-rate=")[0-9.]+(?=")' coverage.xml)
# Multiply by 100 to get the percentage
COVERAGE=$(awk -v cov="$coverage" 'BEGIN {printf "%.2f\n", cov * 100}')
echo "COVERAGE=${COVERAGE}" >> $GITHUB_ENV
echo "Coverage percentage: $COVERAGE"
- name: Display coverage
run: |
echo "Coverage: ${{ env.COVERAGE }}%"