From fac162e5f493f39795efa057cbd6b21a4360aa21 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 21 Jan 2023 01:49:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20codecov=20act?= =?UTF-8?q?ion=20=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99bfda171d2..a297540e727 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: #dotnet test test/UnitTest.Localization -c Release -f net6.0 --collect:"XPlat Code Coverage" -r ./coverage - name: Upload to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./coverage/ From 033579a60b9ded1a773343bdea6d253faaa0c6a4 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 21 Jan 2023 01:49:59 +0800 Subject: [PATCH 2/3] chore: add pull-request action --- .github/workflows/pull-request.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 00000000000..f397b80e375 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,29 @@ +name: Pull Request Checks + +on: + pull_request: + branches: + - master + - test + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET 7.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 7.0.x + + - name: Test + run: | + dotnet test test/UnitTest -c Release --collect:"XPlat Code Coverage" -r ./coverage + + - name: Upload to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false From 6247c5d823734d5b30b23a17bd26e826d1fcf1b0 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 21 Jan 2023 01:50:46 +0800 Subject: [PATCH 3/3] chore: add directory item --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f397b80e375..feae48b0872 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -26,4 +26,5 @@ jobs: uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} + directory: ./coverage/ fail_ci_if_error: false