Merge pull request #294 from mrf345/fix-operator-start-bug #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Coverage Badge | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: pip install -r requirements/test.txt | |
- name: Set coverage percentage | |
run: | | |
echo "COVERAGE=$(pytest --verbose --cov=app | awk '$1 == "TOTAL" {print $NF+0}')%" >> $GITHUB_ENV | |
REF=${{ github.ref }} | |
IFS='/' read -ra PATHS <<< "$REF" | |
BRANCH_NAME="${PATHS[1]}_${PATHS[2]}" | |
echo "BRANCH=$(echo ${BRANCH_NAME})" >> $GITHUB_ENV | |
- name: Generate coverage badge | |
uses: schneegans/dynamic-badges-action@v1.1.0 | |
with: | |
auth: ${{ secrets.GIST_SECRET }} | |
gistID: bc746d7bfe356b54fbb93b2ea5d0d2a4 | |
filename: FQM__${{ env.BRANCH }}.json | |
label: coverage | |
message: ${{ env.COVERAGE }} | |
color: green | |
namedLogo: pytest |