Browse Source

Workaround codecov for forks.

pull/1094/head
James Jackson-South 6 years ago
parent
commit
fa340ba664
  1. 12
      .github/codecov-upstream.yml
  2. 7
      .github/workflows/build-and-test.yml
  3. 7
      codecov.yml

12
.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

7
.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

7
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
Loading…
Cancel
Save