-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 1.3 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Update Coverage
# Controls when the action will run.
on:
workflow_run:
workflows: [ "Switcharoohelper Unit Tests" ]
branches: [ master ]
types:
- completed
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
on-success:
# The type of runner that the job will run on
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Download Coverage data
uses: dawidd6/action-download-artifact@v2
with:
workflow: python-app.yml
commit: ${{github.sha}}
name: coverage_data
- name: Extract coverage number
id: coverage
shell: bash
run: echo "coverage=$(cat total_coverage.txt)" >> $GITHUB_OUTPUT
- name: Create Awesome Badge
uses: schneegans/dynamic-badges-action@v1.6.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 5c26e2c651a043ec65572d815dcbb3cf
filename: switcharoohelper_coverage.json
label: Coverage
message: ${{ steps.coverage.outputs.coverage}}%
color: orange