-
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.
♻️ Upgrade connorjs tools + refactor
Upgrades connorjs tools. Refactors esproj code (changes test results directory, moves client-only files to client, tweaks command line args).
- Loading branch information
Showing
13 changed files
with
324 additions
and
341 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 |
---|---|---|
|
@@ -50,7 +50,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='TestResults/report/SonarQube.xml' | ||
-d:sonar.coverageReportPaths='artifacts/test-results/report/SonarQube.xml' | ||
-k:connorjs_dotnet-with-esproj-example -o:connorjs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
|
@@ -69,22 +69,22 @@ jobs: | |
- name: Fix JS package names | ||
shell: pwsh | ||
run: | | ||
Get-ChildItem TestResults -Filter *.cobertura.xml -Name | Foreach-Object { | ||
Get-ChildItem artifacts/test-results -Filter *.cobertura.xml -Name | Foreach-Object { | ||
$projectName = $_ -replace ".{14}$" | ||
(Get-Content TestResults/$_).replace("package name=`"main`"", "package name=`"${projectName}`"") | Set-Content TestResults/$_ | ||
(Get-Content artifacts/test-results/$_).replace("package name=`"main`"", "package name=`"${projectName}`"") | Set-Content artifacts/test-results/$_ | ||
} | ||
- name: ReportGenerator | ||
uses: danielpalme/[email protected] | ||
with: | ||
reports: TestResults/*.cobertura.xml | ||
targetdir: TestResults/report | ||
reports: artifacts/test-results/*.cobertura.xml | ||
targetdir: artifacts/test-results/report | ||
reporttypes: Cobertura;HtmlInline;JsonSummary;MarkdownSummaryGithub;SonarQube | ||
|
||
- name: Check coverage thresholds | ||
shell: pwsh | ||
run: | | ||
$coverage = Get-Content -Raw TestResults/report/Summary.json | ConvertFrom-Json | ||
$coverage = Get-Content -Raw artifacts/test-results/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 | ||
} | ||
|
@@ -99,15 +99,15 @@ jobs: | |
|
||
- name: Publish coverage in build summary | ||
if: always() # Still publish coverage if tests failed | ||
run: cat TestResults/report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | ||
run: cat artifacts/test-results/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: TestResults/*.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
## Solution ## | ||
|
||
# Build | ||
artifacts/ | ||
dist/ | ||
node_modules/ | ||
|
||
# Test | ||
TestResults/ | ||
|
||
## IDE ## | ||
|
||
# Rider/JetBrains | ||
|
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 +1 @@ | ||
20 | ||
22 |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": "@connorjs/tsconfig/base/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
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 |
---|---|---|
|
@@ -3,11 +3,13 @@ | |
"private": true, | ||
"type": "module", | ||
"devDependencies": { | ||
"@connorjs/tsconfig": "~0.2.0", | ||
"@vitest/coverage-v8": "^2.0.4", | ||
"eslint-config-connorjs": "1.0.0-beta.2", | ||
"@connorjs/tsconfig": "^0.3.0", | ||
"@types/node": "^22.2.0", | ||
"@vitest/coverage-v8": "^2.0.5", | ||
"eslint-config-connorjs": "^1.1.0", | ||
"prettier": "^3.3.3", | ||
"typescript": "^5.5.4", | ||
"vitest": "^2.0.4" | ||
} | ||
"vitest": "^2.0.5" | ||
}, | ||
"packageManager": "[email protected]+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf" | ||
} |
Oops, something went wrong.