-
Notifications
You must be signed in to change notification settings - Fork 220
45 lines (35 loc) · 1.06 KB
/
codecov.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
40
41
42
43
44
45
name: Push Codecov
on:
push:
branches:
- 'main'
paths:
- 'CHANGELOG.md'
concurrency: ci-codecov-${{ github.ref }}
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
hasCoverageKey: ${{steps.outter.outputs.HAS_COVERAGE_KEY}}
steps:
- name: 🙂 Output Key
id: outter
run: |
if [ "${{ secrets.COVERAGE_KEY }}" == "" ]; then
echo "HAS_COVERAGE_KEY=false" >> $GITHUB_OUTPUT
else
echo "HAS_COVERAGE_KEY=true" >> $GITHUB_OUTPUT
fi
codecov:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v4
- name: 🚦 Check & Pack Codecov - RefAssembly
run: dotnet test "./test/ut/Compile/RefAssembly/RefAssembly.csproj" --nologo -f net6.0 -c Release --collect:"XPlat Code Coverage" --results-directory "./coverage/"
- name: 📶 Push to Codecov
if: ${{ needs.prepare.outputs.hasCoverageKey == 'true' }}
uses: codecov/[email protected]
with:
token: ${{ secrets.COVERAGE_KEY }}
directory: ./coverage/