Skip to content

Commit

Permalink
Fix up Actions issues (Azure#31252)
Browse files Browse the repository at this point in the history
* fail-fast: false

* Write-Host instead of Write-Error, judge failure from exit code

* Option 1: Continue processing when an error is written out. Nonzero exit code will fail the step.

* Undo eng/scripts/Logging-Functions.ps1

* Revert typespec-requirement.yaml

* Put ErrorActionPreference in the right place
  • Loading branch information
danieljurek authored Oct 26, 2024
1 parent 851c8e9 commit 1ceae65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/typespec-validation-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
typespec-validation-all:
name: TypeSpec Validation All
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# shards must start at 0 and increment by 1
Expand All @@ -57,13 +58,14 @@ jobs:

- name: Validate All Specs
run: |
# Keep processing when errors are written. Nonzero exit will mark the
# step as failed.
$ErrorActionPreference = 'Continue'
./eng/scripts/TypeSpec-Validation.ps1 `
-Shard ${{ matrix.shard }} `
-TotalShards ${{ matrix.total-shards }} `
-CheckAll `
-GitClean `
-Verbose
# Effectively the same as ignoreLASTEXITCODE: true in Azure DevOps
exit 0
shell: pwsh
11 changes: 8 additions & 3 deletions .github/workflows/typespec-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ jobs:

- name: Validate Impacted Specs
run: |
# Keep processing when errors are written. Nonzero exit will mark the
# step as failed.
$ErrorActionPreference = 'Continue'
eng/scripts/TypeSpec-Requirement.ps1 `
-BaseCommitish HEAD^ `
-TargetCommitish HEAD `
-SpecType ${{ matrix.spec-type }}
./eng/scripts/TypeSpec-Validation.ps1 -GitClean -Verbose
# Effectively the same as ignoreLASTEXITCODE: true in Azure DevOps
exit 0
shell: pwsh

0 comments on commit 1ceae65

Please sign in to comment.