Skip to content

bug #31: code cherry picked from aiortc_adapter to better handle an ice candidate #31

bug #31: code cherry picked from aiortc_adapter to better handle an ice candidate

bug #31: code cherry picked from aiortc_adapter to better handle an ice candidate #31

Workflow file for this run

name: Pytest
on: [pull_request]
jobs:
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Unit tests
run: |
coverage run -m pytest
coverage xml
coverage json
coverage html
- name: Archive code coverage html report
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: htmlcov
- name: Get Cover
uses: orgoro/coverage@v3
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract results
run: |
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
echo "total=$TOTAL" >> $GITHUB_ENV
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
- name: Make badge
uses: schneegans/[email protected]
with:
# GIST_TOKEN is a GitHub personal access token with scope "gist".
auth: ${{ secrets.GIST_TOKEN }}
gistID: 230b4e6552d2c13164e28598eab5c1e3
filename: gst-signalling-covbadge.json
label: Coverage
message: ${{ env.total }}%
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ env.total }}