Skip to content

Commit

Permalink
Workaround jest non-support of mono repos
Browse files Browse the repository at this point in the history
The issues in jest specifically are tracked in:
kulshekhar/ts-jest#1343
kulshekhar/ts-jest#1109
  • Loading branch information
AArnott committed Feb 3, 2020
1 parent 63e54de commit 9e66fa1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -40,7 +40,7 @@ jobs:
run: ./build_all.ps1
shell: pwsh
- name: Test
run: yarn test
run: ./test_all.ps1

- name: Stamping NPM versions
run: .github/workflows/set_version.ps1 -Version ${{ steps.nbgv.outputs.NpmPackageVersion }}
Expand Down
26 changes: 26 additions & 0 deletions test_all.ps1
@@ -0,0 +1,26 @@
# This script is necessary until https://github.com/kulshekhar/ts-jest/issues/1343 is fixed.
# In particular, we need this addressed: https://github.com/kulshekhar/ts-jest/issues/1109

$testOrder = Get-ChildItem "$PSScriptRoot\*cloudbuild-task-*" -Directory

$failed = $false
$testOrder | % {
Write-Host -ForegroundColor Blue "Testing $($_.BaseName)"
Push-Location $_
try {
yarn jest
if ($LASTEXITCODE -ne 0) {
$failed = $true
}
}
finally {
Pop-Location
}
}

if ($failed) {
Write-Host -ForegroundColor Red "Overall test run failure"
exit 1
} else {
Write-Host -ForegroundColor Green "All tests passed!"
}

0 comments on commit 9e66fa1

Please sign in to comment.