Skip to content

Test coverage badge #19

Test coverage badge

Test coverage badge #19

Workflow file for this run

name: Test Coverage
on: [pull_request]
jobs:
coverage:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
C:\Miniconda\condabin\conda.bat update -n base -c defaults conda
C:\Miniconda\condabin\conda.bat config --add channels conda-forge
C:\Miniconda\condabin\conda.bat config --set channel_priority strict
C:\Miniconda\condabin\conda.bat env update --file environment.yaml --name base
C:\Miniconda\condabin\conda.bat activate base
C:\Miniconda\condabin\conda.bat install coverage
C:\Miniconda\condabin\conda.bat init powershell
- name: Check coverage
run: |
# Activate the testenv environment
C:\Miniconda\condabin\conda.bat activate base
C:\Miniconda\condabin\conda.bat list
coverage run -m pytest
echo "PCOV=35" >> "$GITHUB_ENV"
- name: Create badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.TEST_COVERAGE_GIST }}
gistID: 8ec74eae558f3a7793622f6469064b73
filename: test_coverage_badge.json
label: Test coverage
message: "${{ PCOV }}%"

Check failure on line 38 in .github/workflows/TestCoverage.yml

View workflow run for this annotation

GitHub Actions / Test Coverage

Invalid workflow file

The workflow is not valid. .github/workflows/TestCoverage.yml (Line: 38, Col: 20): Unrecognized named-value: 'PCOV'. Located at position 1 within expression: PCOV
valColorRange: $PCOV
maxColorRange: 100
minColorRange: 0