Skip to content

Commit 63b680b

Browse files
ArgoZhangdensen2014lambert leeh2ls
authored
add codecov action check for pull-request (#360)
Co-authored-by: alex chow <zhouchuanglin@gmail.com> Co-authored-by: lambert lee <1708416@qq.com> Co-authored-by: lambert lee <lish@live.cn>
1 parent 220feba commit 63b680b

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
#dotnet test test/UnitTest.Localization -c Release -f net6.0 --collect:"XPlat Code Coverage" -r ./coverage
3434
3535
- name: Upload to Codecov
36-
uses: codecov/codecov-action@v2
36+
uses: codecov/codecov-action@v3
3737
with:
3838
token: ${{ secrets.CODECOV_TOKEN }}
3939
directory: ./coverage/

.github/workflows/pull-request.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Pull Request Checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- test
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Setup .NET 7.0
17+
uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: 7.0.x
20+
21+
- name: Test
22+
run: |
23+
dotnet test test/UnitTest -c Release --collect:"XPlat Code Coverage" -r ./coverage
24+
25+
- name: Upload to Codecov
26+
uses: codecov/codecov-action@v3
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
directory: ./coverage/
30+
fail_ci_if_error: false

0 commit comments

Comments
 (0)