Skip to content

Commit

Permalink
[TT-13753] Fix sonarcloud coverage via upload-artifact (#6790)
Browse files Browse the repository at this point in the history
### **User description**
<details open>
<summary><a href="https://tyktech.atlassian.net/browse/TT-13753"
title="TT-13753" target="_blank">TT-13753</a></summary>
  <br />
  <table>
    <tr>
      <th>Summary</th>
      <td>Update usage of upload-artifact</td>
    </tr>
    <tr>
      <th>Type</th>
      <td>
<img alt="Task"
src="https://tyktech.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium"
/>
        Task
      </td>
    </tr>
    <tr>
      <th>Status</th>
      <td>In Code Review</td>
    </tr>
    <tr>
      <th>Points</th>
      <td>N/A</td>
    </tr>
    <tr>
      <th>Labels</th>
<td><a
href="https://tyktech.atlassian.net/issues?jql=project%20%3D%20TT%20AND%20labels%20%3D%20SESAP%20ORDER%20BY%20created%20DESC"
title="SESAP">SESAP</a></td>
    </tr>
  </table>
</details>
<!--
  do not remove this marker as it will break jira-lint's functionality.
  added_by_jira_lint
-->

---

https://tyktech.atlassian.net/browse/TT-13753


___

### **PR Type**
Bug fix, Configuration changes


___

### **Description**
- Removed the step to reclaim runner space in the CI workflow,
optimizing the process.
- Updated file paths in the `Check reports existence` step to ensure
proper validation of required files.
- Adjusted SonarCloud configuration to use the correct paths for
coverage and lint reports.
- Improved the CI workflow to enhance compatibility with SonarCloud and
ensure accurate coverage reporting.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>ci-tests.yml</strong><dd><code>Fix SonarCloud coverage
and streamline CI workflow configuration</code></dd></summary>
<hr>

.github/workflows/ci-tests.yml

<li>Removed redundant step to reclaim runner space.<br> <li> Updated
file paths in <code>Check reports existence</code> step to ensure
correct <br>file validation.<br> <li> Adjusted SonarCloud configuration
to use updated coverage and lint <br>report paths.<br>


</details>


  </td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/6790/files#diff-03609cb60b0c6e92fb771eb8787d6722b8c31ca4c03eabc788e147acd8c6fb43">+3/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information

Co-authored-by: Tit Petric <[email protected]>
  • Loading branch information
titpetric and Tit Petric authored Dec 19, 2024
1 parent 1deb1e6 commit 51e50c3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ jobs:
REDIS_IMAGE: redis:${{ matrix.redis-version }}

steps:
- name: "Reclaim some runner space"
run: sudo rm -rf /usr/local/bin/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL

- name: Checkout Tyk
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -212,9 +209,10 @@ jobs:

- name: Check reports existence
id: check_files
uses: andstor/file-existence-action@v1
uses: andstor/file-existence-action@v3
with:
files: 'coverage/gateway-all.cov, golangci-lint-report.json'
files: 'gateway-all.cov, golangci-lint-report.json'
fail: true

- name: Install Dependencies
env:
Expand All @@ -233,7 +231,7 @@ jobs:
-Dsonar.coverage.exclusions=**/*_test.go,**/mock/*
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.tests=.
-Dsonar.go.coverage.reportPaths=coverage/gateway-all.cov
-Dsonar.go.coverage.reportPaths=gateway-all.cov
-Dsonar.go.golangci-lint.reportPaths=golangci-lint-report.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 51e50c3

Please sign in to comment.