|
1 | 1 | variables: |
2 | | - YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn |
3 | 2 | stableNodeVersion: "14.x" |
4 | 3 | currentNodeVersion: "16.x" |
5 | 4 | # Used with `eslintVersion` to see if `spec:e2e` and `benchmarks` should run |
@@ -88,27 +87,19 @@ steps: |
88 | 87 | inputs: |
89 | 88 | versionSpec: $(nodeVersion) |
90 | 89 | displayName: Install node@$(nodeVersion) |
91 | | - - task: Cache@2 |
92 | | - inputs: |
93 | | - key: 'yarn | "$(Agent.OS)" | yarn.lock' |
94 | | - restoreKeys: | |
95 | | - yarn | "$(Agent.OS)" |
96 | | - yarn |
97 | | - path: $(YARN_CACHE_FOLDER) |
98 | | - displayName: Cache Yarn packages |
99 | | - - script: yarn --frozen-lockfile && yarn add --dev $(eslintVersion) && yarn test |
100 | | - displayName: Install dependencies and run yarn test |
| 90 | + - script: npm ci && npm i -D $(eslintVersion) && npm test |
| 91 | + displayName: Install dependencies and run npm test |
101 | 92 | # E2E tests use eslint@7+ only feature (the Node.js API class ESLint) |
102 | 93 | # Also disabled on windows because of jest snapshot problems |
103 | | - - script: yarn spec:e2e |
| 94 | + - script: npm run spec:e2e |
104 | 95 | condition: and(contains(variables['eslintVersion'], variables['e2eEslintVersion']), ne(variables['imageName'], 'vs2017-win2016')) |
105 | | - displayName: Run yarn spec:e2e if $(eslintVersion) >= $(e2eEslintVersion) |
| 96 | + displayName: Run npm run spec:e2e if $(eslintVersion) >= $(e2eEslintVersion) |
106 | 97 | # Benchmarks use eslint@7_ only feature (the Node.js API class ESLint) |
107 | | - - script: yarn benchmarks |
| 98 | + - script: npm run benchmarks |
108 | 99 | condition: contains(variables['eslintVersion'], variables['e2eEslintVersion']) |
109 | | - displayName: Run yarn benchmarks if $(eslintVersion) >= $(e2eEslintVersion) |
| 100 | + displayName: Run npm run benchmarks if $(eslintVersion) >= $(e2eEslintVersion) |
110 | 101 | # Upload Jest code coverage |
111 | | - - script: yarn spec --coverage --coverageReporters=cobertura |
| 102 | + - script: npm run spec --coverage --coverageReporters=cobertura |
112 | 103 | displayName: Generate Jest coverage report |
113 | 104 | - task: PublishCodeCoverageResults@1 |
114 | 105 | inputs: |
|
0 commit comments