Skip to content

Commit

Permalink
ci: download build if exists (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuVeber authored Apr 12, 2024
1 parent ca48311 commit 75b77f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ jobs:
- name: Download Coverage
uses: actions/download-artifact@v4
with:
name: coverage.xml
path: .
pattern: coverage

- name: Check Coverage
id: coverage
run: test -e coverage/coverage.xml && echo "file=true" >> $GITHUB_OUTPUT || echo "file=false" >> $GITHUB_OUTPUT

- name: Select Project
env:
Expand All @@ -54,4 +59,4 @@ jobs:
args: >
-Dsonar.projectKey=${{ env.GITHUB_PROJECT }}
-Dsonar.organization=${{ github.repository_owner }}
-Dsonar.coverageReportPaths=coverage.xml
${{steps.coverage.outputs.file == 'true' && '-Dsonar.coverageReportPaths=coverage/coverage.xml' || ''}}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ jobs:
- name: Download Build
uses: actions/download-artifact@v4
with:
name: build
path: dist
path: .
pattern: dist

- name: Setup Service
run: NODE_ENV=test npm run setup --if-present
Expand All @@ -101,5 +101,5 @@ jobs:
- name: Upload Coverage
uses: actions/upload-artifact@v4
with:
name: coverage.xml
name: coverage
path: coverage.xml
2 changes: 1 addition & 1 deletion .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ jobs:
- name: Upload Build
uses: actions/upload-artifact@v4
with:
name: build
name: dist
path: dist

0 comments on commit 75b77f3

Please sign in to comment.