Browse Source

fix(ci): Clone repo with higher depth to fix codecov problems (#24211)

I have had a problem where Codecov either shows too much difference
between my PR and master, or no diff at all. Both states have happened
within the same PR as Codecov processed new webhooks from GitHub, and in
both cases merge commits were involved. With Codecov support I have
found that their uploader throws this particular error message, and
so let's try giving the uploader more commits so maybe next time it
determines the parent commits correctly (?).
Markus Unterwaditzer 4 years ago
parent
commit
0f7b6f83fc

+ 5 - 0
.github/workflows/acceptance.yml

@@ -25,6 +25,11 @@ jobs:
       - uses: actions/checkout@v2
         name: Checkout sentry
 
+        with:
+          # Avoid codecov error message related to SHA resolution:
+          # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
+          fetch-depth: '2'
+
       - uses: volta-cli/action@v1
 
       # See https://github.com/actions/cache/blob/master/examples.md#node---yarn for example

+ 5 - 0
.github/workflows/backend-test.yml

@@ -49,6 +49,11 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
+        with:
+          # Avoid codecov error message related to SHA resolution:
+          # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
+          fetch-depth: '2'
+
       # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically
       # creates a status check in the "pending" state. This means that the workflow needs to run
       # for every PR in order to update the status checks.

+ 5 - 0
.github/workflows/relay-integration-test.yml

@@ -14,6 +14,11 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
+        with:
+          # Avoid codecov error message related to SHA resolution:
+          # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
+          fetch-depth: '2'
+
       - name: Check for python file changes
         uses: getsentry/paths-filter@v2
         id: changes

+ 5 - 0
.github/workflows/snuba-integration-test.yml

@@ -22,6 +22,11 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
+        with:
+          # Avoid codecov error message related to SHA resolution:
+          # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
+          fetch-depth: '2'
+
       # If we make these jobs "required" to merge on GH, then on every PR, GitHub automatically
       # creates a status check in the "pending" state. This means that the workflow needs to run
       # for every PR in order to update the status checks.

+ 5 - 0
.github/workflows/symbolicator-integration-test.yml

@@ -14,6 +14,11 @@ jobs:
     steps:
       - uses: actions/checkout@v2
 
+        with:
+          # Avoid codecov error message related to SHA resolution:
+          # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
+          fetch-depth: '2'
+
       - name: Check for python file changes
         uses: getsentry/paths-filter@v2
         id: changes