Skip to content

Commit

Permalink
Fix sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
joernott committed Aug 16, 2024
1 parent 9d9660e commit 515b0b1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
7 changes: 0 additions & 7 deletions consolidate_artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,3 @@ runs:
path: ${{ inputs.path }}
retention-days: 4
overwrite: true

- name: 'Remove artifacts'
uses: joernott/rm-artifact@v1
with:
name: '${{ inputs.pattern }}'
useGlob: true
failOnError: false
26 changes: 17 additions & 9 deletions sonarcloud/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ inputs:
runs:
using: "composite"
steps:
- name: 'Consolidate coverage artifacts'
uses: 'OXID-eSales/github-actions/consolidate_artifacts@v4'
- name: 'Download artifacts'
uses: actions/download-artifact@v4
with:
target: '${{ inputs.output_artifact }}'
pattern: '${{ inputs.coverage_artifact }}'
merge-multiple: true
path: coverage-reports

- name: Fix Paths In Coverage Reports
Expand All @@ -91,7 +91,7 @@ runs:
cp "${FILE}" "${FILE}.orig"
sed -e 's|${{ inputs.strip_path }}||' -i ${FILE}
COVERAGE_FILES="${COVERAGE_FILES},${FILE}"
# diff -y --color=always "${FILE}.orig" "${FILE}" || true
diff -y --color=always "${FILE}.orig" "${FILE}" || true
done
# remove leading comma when adding this
echo "COVERAGE_PARAM=-Dsonar.php.coverage.reportPaths=${COVERAGE_FILES:1}"| tee -a "${GITHUB_ENV}"
Expand All @@ -108,12 +108,20 @@ runs:
echo "PHPUNIT_PARAM=-Dsonar.php.tests.reportPath=${PHPUNIT_FILES:1}"| tee -a "${GITHUB_ENV}"
fi
- name: Update consolidated coverage artifact
uses: 'OXID-eSales/github-actions/consolidate_artifacts@v4'
- name: Upload consolidated artifact
uses: actions/upload-artifact@v4
with:
target: '${{ inputs.output_artifact }}'
pattern: '${{ inputs.coverage_artifact }}'
path: coverage-reports
name: '${{ inputs.output_artifact }}'
path: '${{ inputs.coverage_artifact }}'
retention-days: 4
overwrite: true

- name: 'Remove old artifacts'
uses: joernott/rm-artifact@v1
with:
name: '${{ inputs.coverage_artifact }}'
useGlob: true
failOnError: false

- name: Set target branch
shell: bash
Expand Down

0 comments on commit 515b0b1

Please sign in to comment.