Skip to content

Commit

Permalink
TestCoverage.yml: use GITHUB_OUTPUT to pass variable
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mysh committed Apr 22, 2024
1 parent 290506b commit 2089395
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/TestCoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,24 @@ jobs:
C:\Miniconda\condabin\conda.bat activate base
C:\Miniconda\condabin\conda.bat install coverage
C:\Miniconda\condabin\conda.bat init powershell
- name: Check coverage
- id: check-coverage
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"
echo "P_COV=35" >> "$GITHUB_OUTPUT"
- name: Create badge
env:
P_COV: ${{ steps.check-coverage.outputs.P_COV }}
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 }}%"
valColorRange: $PCOV
message: "is $P_COV"
valColorRange: ${{ P_COV }}
maxColorRange: 100
minColorRange: 0

0 comments on commit 2089395

Please sign in to comment.