From f90c4f529012afd87dd6f3aef5d93f60aa4a6b9a Mon Sep 17 00:00:00 2001 From: Sveinung Date: Mon, 25 Sep 2023 11:53:51 +0200 Subject: [PATCH 1/6] Use Windows agent for build --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index da74b911..4fa41f0b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v3 From 187778b51749a3ea6a058ca896168c9fd817df87 Mon Sep 17 00:00:00 2001 From: Sveinung Date: Mon, 25 Sep 2023 11:55:19 +0200 Subject: [PATCH 2/6] Run build from dev branch --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4fa41f0b..b3319e89 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,7 +5,7 @@ name: .NET on: push: - branches: [ "main" ] + branches: [ "main", "dev/action" ] pull_request: branches: [ "main" ] From 479991ab490ab11eca377a2e044e21277a1a1c14 Mon Sep 17 00:00:00 2001 From: Sveinung Date: Mon, 25 Sep 2023 18:21:37 +0200 Subject: [PATCH 3/6] Code coverage --- .github/workflows/dotnet.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b3319e89..65a19c25 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,7 +1,7 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: .NET +name: build on: push: @@ -25,4 +25,8 @@ jobs: - name: Build run: dotnet build --no-restore - name: Test - run: dotnet test --no-build --verbosity normal + run: dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 6444c3845c454991c447ae36aca69ed109eeb2af Mon Sep 17 00:00:00 2001 From: Sveinung Date: Tue, 26 Sep 2023 15:45:50 +0200 Subject: [PATCH 4/6] Ignore benchmarks for code coverage --- codecov.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..203a6dbc --- /dev/null +++ b/codecov.yml @@ -0,0 +1,2 @@ +ignore: + - "[SpreadCheetah.Benchmark]" From a8e698af927d565f0d23be577e30775271c32e1e Mon Sep 17 00:00:00 2001 From: Sveinung Date: Tue, 26 Sep 2023 16:12:47 +0200 Subject: [PATCH 5/6] Update path in codecov.yml --- codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index 203a6dbc..b12cf1b6 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,2 +1,2 @@ ignore: - - "[SpreadCheetah.Benchmark]" + - "SpreadCheetah.Benchmark" From 1af2dd3a3bb9d612ce098faaaf08bf9d8cabec1c Mon Sep 17 00:00:00 2001 From: Sveinung Date: Tue, 26 Sep 2023 16:46:03 +0200 Subject: [PATCH 6/6] Update build trigger --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 65a19c25..233541b1 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,7 +5,7 @@ name: build on: push: - branches: [ "main", "dev/action" ] + branches: [ "main" ] pull_request: branches: [ "main" ]