-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1021 Bytes
/
test-action.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
name: 'test-action'
on:
pull_request:
push:
branches:
- master
jobs:
test-action:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Unit Tests and Generate Coverage
id: run-tests
uses: ./
with:
project: 'test/Test.Project'
threshold: 80 # Example: Set coverage threshold to 80%
dotnet-version: '8.0'
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ${{ steps.run-tests.outputs.coverage-report-path }} # Use the output from the previous step to upload the report
- name: Upload to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.run-tests.outputs.coverage-report-path }}/*.cobertura.xml
flags: unittests
name: codecov-coverage
fail_ci_if_error: true