From 6f7e4fd0fe0d28261572b569b2fb0f84003819e9 Mon Sep 17 00:00:00 2001 From: Diego Juliao Date: Mon, 23 Dec 2024 00:06:37 -0500 Subject: [PATCH] ci: try another technique to download reports on sonar workflow --- .github/actions/download-build/action.yml | 9 ++++++++- .github/actions/download-coverage-report/action.yml | 9 ++++++++- .github/actions/download-lint-report/action.yml | 9 ++++++++- .github/workflows/pr.yml | 8 ++++---- .github/workflows/sonar-pr.yml | 4 ++++ 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/actions/download-build/action.yml b/.github/actions/download-build/action.yml index de85813d..b02e8948 100644 --- a/.github/actions/download-build/action.yml +++ b/.github/actions/download-build/action.yml @@ -1,10 +1,17 @@ name: Download Builds description: Downloading the github artifact created with the build (dist folder) + +inputs: + sha: + description: 'SHA to use for the artifact name' + required: false + default: ${{ github.sha }} + runs: using: composite steps: - name: Download dist folder uses: actions/download-artifact@v4 with: - name: library-dist-${{ github.event.workflow_run.head_sha || github.sha }} + name: library-dist-${{ inputs.sha }} path: dist diff --git a/.github/actions/download-coverage-report/action.yml b/.github/actions/download-coverage-report/action.yml index bc6b0bff..49b00996 100644 --- a/.github/actions/download-coverage-report/action.yml +++ b/.github/actions/download-coverage-report/action.yml @@ -1,10 +1,17 @@ name: Download Coverage Reports description: Download the github artifact created with the `test --coverage` + +inputs: + sha: + description: 'SHA to use for the artifact name' + required: false + default: ${{ github.sha }} + runs: using: composite steps: - name: Download coverage report uses: actions/download-artifact@v4 with: - name: ngx-deploy-npm-coverage-report-${{ github.event.workflow_run.head_sha || github.sha }} + name: ngx-deploy-npm-coverage-report-${{ inputs.sha }} path: coverage/packages/ngx-deploy-npm diff --git a/.github/actions/download-lint-report/action.yml b/.github/actions/download-lint-report/action.yml index 7feac358..c0419029 100644 --- a/.github/actions/download-lint-report/action.yml +++ b/.github/actions/download-lint-report/action.yml @@ -1,10 +1,17 @@ name: Download Lint Reports description: Download the github artifact with the lint report + +inputs: + sha: + description: 'SHA to use for the artifact name' + required: false + default: ${{ github.sha }} + runs: using: composite steps: - name: Download lint report uses: actions/download-artifact@v4 with: - name: lint-report-${{ github.event.workflow_run.head_sha || github.sha }} + name: lint-report-${{ inputs.sha }} path: reports diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0b4b8c56..e591b9e0 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -35,7 +35,7 @@ jobs: - name: Check if Prettier was run run: npx pretty-quick --check - backwards-compatibility-test: - name: Backwards compatibility test - needs: [pr-test] - uses: ./.github/workflows/backwards-compatibility-test.yml + # backwards-compatibility-test: + # name: Backwards compatibility test + # needs: [pr-test] + # uses: ./.github/workflows/backwards-compatibility-test.yml diff --git a/.github/workflows/sonar-pr.yml b/.github/workflows/sonar-pr.yml index 36ae5932..82f7ae7b 100644 --- a/.github/workflows/sonar-pr.yml +++ b/.github/workflows/sonar-pr.yml @@ -18,7 +18,11 @@ jobs: # Download reports - uses: ./.github/actions/download-coverage-report + with: + sha: ${{ github.event.workflow_run.head_sha }} - uses: ./.github/actions/download-lint-report + with: + sha: ${{ github.event.workflow_run.head_sha }} - name: SonarCloud Scan uses: sonarsource/sonarcloud-github-action@master