Skip to content

Commit

Permalink
[engsys] build test assets only for browser runs (#27035)
Browse files Browse the repository at this point in the history
We no longer run Node tests against bundled tests. The test inputs are
from dist-esm/test and running `build` produces the same output as
`build:test` as far as Node is concerned.

For browser we still need the bundled tests from `build:test`.

This PR enables "Build test assets" step only if the run is for browser.

---------

Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
  • Loading branch information
jeremymeng and benbp authored Sep 7, 2023
1 parent 0bb13c5 commit e453c2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- script: |
node common/scripts/install-run-rush.js build:test -t "${{parameters.PackageName}}" --verbose -p max
displayName: "Build test assets"
condition: and(succeededOrFailed(),eq(variables['DependencyVersion'],''))
condition: and(succeededOrFailed(), eq(variables['TestType'], 'browser'), eq(variables['DependencyVersion'],''))
- script: |
npm install
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/templates/steps/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ steps:
- script: |
node eng/tools/rush-runner.js build:test "${{parameters.ServiceDirectory}}" -packages "$(ArtifactPackageNames)" --verbose -p max
displayName: "Build test assets"
condition: and(succeeded(), eq(variables['TestType'], 'browser'))
- template: ../steps/use-node-test-version.yml

Expand Down

0 comments on commit e453c2d

Please sign in to comment.