Skip to content

Commit 86c7a3c

Browse files
authored
[engsys] Avoid running eslint plugin unit tests on every analyze (Azure#27938)
### Describe the problem that is addressed by this PR I noticed that we were running the unit tests for `@azure/eslint-plugin-azure-sdk` as part of the 'run-eslint' step that gets kicked off as part of `analyze` for every SDK package. This meant we spent 1 minute 30 seconds running unit tests each and every time we ran CI for any package. My (perhaps incomplete) understanding is that we added running the tests so that the ci.yml for `@azure/eslint-plugin-azure-sdk` could run the tests as part of CI, but I don't think we intended to have them run all the time for everyone. This change creates a new `test-eslint` template that can be used by `ci.yml` and removes running the unit tests from the normal analyze step.
1 parent 0e17ec1 commit 86c7a3c

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

common/tools/eslint-plugin-azure-sdk/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- template: /eng/pipelines/templates/steps/common.yml
3434

3535
# Run lint step for all SDK
36-
- template: /eng/pipelines/templates/steps/run-eslint.yml
36+
- template: /eng/pipelines/templates/steps/test-eslint.yml

eng/pipelines/templates/steps/run-eslint.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ steps:
1010
node common/scripts/install-run-rush.js build -t @azure/eslint-plugin-azure-sdk
1111
node eng/tools/rush-runner.js lint "${{parameters.ServiceDirectory}}" -p max
1212
displayName: "Build ESLint Plugin and Lint Libraries"
13-
14-
- pwsh: |
15-
node common/scripts/install-run-rush.js test -t @azure/eslint-plugin-azure-sdk --verbose
16-
displayName: "Run ESLint Plugin Unit Tests"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
parameters:
2+
ServiceDirectory: ''
3+
4+
steps:
5+
- script: |
6+
node common/scripts/install-run-rush.js install
7+
displayName: "Install library dependencies"
8+
9+
- pwsh: |
10+
node common/scripts/install-run-rush.js build -t @azure/eslint-plugin-azure-sdk
11+
node eng/tools/rush-runner.js lint "${{parameters.ServiceDirectory}}" -p max
12+
displayName: "Build ESLint Plugin and Lint Libraries"
13+
14+
- pwsh: |
15+
node common/scripts/install-run-rush.js test -t @azure/eslint-plugin-azure-sdk --verbose
16+
displayName: "Run ESLint Plugin Unit Tests"

0 commit comments

Comments
 (0)