-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚚 Rearrange artifacts directory (#9)
Inverts artifacts directory to have `project/type` organization instead of the previous `type/project`. This improves project-specific inspection and cleaning.
- Loading branch information
Showing
9 changed files
with
29 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ jobs: | |
-d:sonar.host.url='https://sonarcloud.io' | ||
-d:sonar.test.inclusions='**/*-test/**/*.cs,**/*.test.ts' | ||
-d:sonar.exclusions='**/*.json,**/*.props' | ||
-d:sonar.coverageReportPaths='artifacts/test-results/report/SonarQube.xml' | ||
-d:sonar.coverageReportPaths='artifacts/report/SonarQube.xml' | ||
-k:connorjs_dotnet-with-esproj-example -o:connorjs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
|
@@ -61,22 +61,22 @@ jobs: | |
- name: Fix JS package names | ||
shell: pwsh | ||
run: | | ||
Get-ChildItem artifacts/test-results -Filter *.cobertura.xml -Name | Foreach-Object { | ||
$projectName = $_ -replace ".{14}$" | ||
(Get-Content artifacts/test-results/$_).replace("package name=`"main`"", "package name=`"${projectName}`"") | Set-Content artifacts/test-results/$_ | ||
Get-ChildItem artifacts -Recurse -Filter *.cobertura.xml -Name | Foreach-Object { | ||
$projectName = ($_ -split "/")[0] | ||
(Get-Content artifacts/$_).replace("package name=`"main`"", "package name=`"${projectName}`"") | Set-Content artifacts/$_ | ||
} | ||
- name: ReportGenerator | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: artifacts/test-results/*.cobertura.xml | ||
targetdir: artifacts/test-results/report | ||
reports: artifacts/*/test-results/*.cobertura.xml | ||
targetdir: artifacts/report | ||
reporttypes: Cobertura;HtmlInline;JsonSummary;MarkdownSummaryGithub;SonarQube | ||
|
||
- name: Check coverage thresholds | ||
shell: pwsh | ||
run: | | ||
$coverage = Get-Content -Raw artifacts/test-results/report/Summary.json | ConvertFrom-Json | ||
$coverage = Get-Content -Raw artifacts/report/Summary.json | ConvertFrom-Json | ||
if ($coverage.summary.linecoverage -lt 80 -or $coverage.summary.branchcoverage -lt 80 -or $coverage.summary.methodcoverage -lt 80) { | ||
Write-Error "Coverage does not meet threshold.`n`nCI build failed."; Exit 1 | ||
} | ||
|
@@ -91,15 +91,15 @@ jobs: | |
|
||
- name: Publish coverage in build summary | ||
if: always() # Still publish coverage if tests failed | ||
run: cat artifacts/test-results/report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | ||
run: cat artifacts/report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | ||
|
||
- name: Upload coverage report to Codecov | ||
if: always() # Still upload to CodeCov if tests failed | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
disable_search: true | ||
fail_ci_if_error: true | ||
files: artifacts/test-results/*.cobertura.xml | ||
files: artifacts/*/test-results/*.cobertura.xml | ||
flags: unittests | ||
plugins: noop | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "../../artifacts/tsc/hello-js" | ||
"outDir": "../../artifacts/hello-js/tsc" | ||
}, | ||
"extends": "../tsconfig.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters