diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..eada3d7 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,20 @@ +codecov: + require_ci_to_pass: no + +coverage: + precision: 2 + round: down + range: "70...100" + + status: + project: yes + patch: yes + changes: no + fixes: + - "/home/runner/work/system-76-keyboards/system-76-keyboards/::" + + +comment: + layout: "reach,diff,flags,tree" + behavior: default + require_changes: no diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b35e9a9..6520547 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,6 @@ name: Builder -on: [push] +on: [pull_request] jobs: tests: @@ -18,10 +18,14 @@ jobs: run: dotnet test --settings coverletArgs.runsettings - name: Stage code coverage working-directory: csharp - run: mv UnitTests/TestResults/*/coverage.opencover.xml . + run: mv UnitTests/TestResults/*/coverage.info . + - name: Save coverage as artifact + uses: actions/upload-artifact@v1 + with: + name: coverage-report + path: csharp/coverage.info - name: Upload coverage - uses: codecov/codecov-action@v1 + uses: coverallsapp/github-action@master with: - token: ${{ secrets.CODECOV }} - file: csharp/coverage.opencover.xml - name: Coverage \ No newline at end of file + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./csharp/coverage.info diff --git a/csharp/coverletArgs.runsettings b/csharp/coverletArgs.runsettings index e1a3c14..eb5d8e3 100644 --- a/csharp/coverletArgs.runsettings +++ b/csharp/coverletArgs.runsettings @@ -5,7 +5,7 @@ results - xml,opencover + lcov [UnitTests]* Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute false