diff --git a/.github/codecov-upstream.yml b/.github/codecov-upstream.yml new file mode 100644 index 000000000..b62032bfb --- /dev/null +++ b/.github/codecov-upstream.yml @@ -0,0 +1,12 @@ +# Documentation: https://docs.codecov.io/docs/codecov-yaml + +codecov: + # Avoid "Missing base report" + # https://github.com/codecov/support/issues/363 + # https://docs.codecov.io/docs/comparing-commits + allow_coverage_offsets: true + + # Avoid "Please provide the repository token to upload reports via `-t :repository-token`" + # https://community.codecov.io/t/whitelist-github-action-servers-to-upload-without-a-token/491/10 + # https://github.community/t5/GitHub-Actions/Make-secrets-available-to-builds-of-forks/m-p/42814/highlight/true#M5129 + token: 0ef021c7-2679-4012-b42f-4bed33d99450 diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b4b966a02..5698f549a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -85,6 +85,13 @@ jobs: CI: True XUNIT_PATH: .\tests\ImageSharp.Tests # Required for xunit + # Avoid "Please provide the repository token to upload reports via `-t :repository-token`" + # https://community.codecov.io/t/whitelist-github-action-servers-to-upload-without-a-token/491/10 + # https://github.community/t5/GitHub-Actions/Make-secrets-available-to-builds-of-forks/m-p/42814/highlight/true#M5129 + - name: Prepare Codecov Token + if: matrix.options.codecov == true && github.repository == 'SixLabors/ImageSharp' + run: cp .github/codecov-upstream.yml .codecov.yml + - name: Update Codecov uses: iansu/codecov-action-node@v1.0.0 if: matrix.options.codecov == true diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..3941f7ff9 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,7 @@ +# Documentation: https://docs.codecov.io/docs/codecov-yaml + +codecov: + # Avoid "Missing base report" + # https://github.com/codecov/support/issues/363 + # https://docs.codecov.io/docs/comparing-commits + allow_coverage_offsets: true