|
9 | 9 | - '**'
|
10 | 10 |
|
11 | 11 | env:
|
| 12 | + PRIMARY_ESLINT_VERSION: '^8.0.0' |
12 | 13 | PRIMARY_NODE_VERSION: 18
|
| 14 | + PRIMARY_TYPESCRIPT_VERSION: '~4.8.0' |
13 | 15 |
|
14 | 16 | defaults:
|
15 | 17 | run:
|
@@ -117,6 +119,7 @@ jobs:
|
117 | 119 | strategy:
|
118 | 120 | matrix:
|
119 | 121 | # just run on the oldest and latest supported versions and assume the intermediate versions are good
|
| 122 | + # unfortunately you can't reference environment variables in an array :( |
120 | 123 | node-version: [14, 18]
|
121 | 124 | package:
|
122 | 125 | [
|
@@ -172,6 +175,102 @@ jobs:
|
172 | 175 | # Sadly 1 day is the minimum
|
173 | 176 | retention-days: 1
|
174 | 177 |
|
| 178 | + unit_tests_ts_regression: |
| 179 | + name: Run Unit Tests (TypeScript Version Regression Checks) |
| 180 | + needs: [build] |
| 181 | + runs-on: ubuntu-latest |
| 182 | + strategy: |
| 183 | + matrix: |
| 184 | + package: |
| 185 | + # note that we don't regression test all packages here on purpose because most don't depend on TS directly. |
| 186 | + ['eslint-plugin', 'scope-manager', 'type-utils', 'typescript-estree'] |
| 187 | + |
| 188 | + ts-version: |
| 189 | + # unfortunately you can't reference environment variables in an array :( |
| 190 | + [ |
| 191 | + # lowest possible version |
| 192 | + '3.3.1', |
| 193 | + # somewhere in the middle for sanity check |
| 194 | + '~4.0.8', |
| 195 | + # highest possible version |
| 196 | + '~4.8.2', |
| 197 | + ] |
| 198 | + env: |
| 199 | + # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app |
| 200 | + NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' |
| 201 | + COLLECT_COVERAGE: false |
| 202 | + steps: |
| 203 | + - name: Checkout |
| 204 | + uses: actions/checkout@v3 |
| 205 | + with: |
| 206 | + fetch-depth: 2 |
| 207 | + - name: Install |
| 208 | + uses: ./.github/actions/prepare-install |
| 209 | + with: |
| 210 | + node-version: ${{ env.PRIMARY_NODE_VERSION }} |
| 211 | + - name: Build |
| 212 | + uses: ./.github/actions/prepare-build |
| 213 | + |
| 214 | + - name: Install Specific TS Version |
| 215 | + run: | |
| 216 | + yarn ts-node ./tools/change-ts-version.ts ${{ matrix.ts-version }} |
| 217 | + yarn --ignore-engines --ignore-scripts |
| 218 | +
|
| 219 | + - name: Patch Packages |
| 220 | + if: matrix.ts-version == env.PRIMARY_TYPESCRIPT_VERSION |
| 221 | + run: | |
| 222 | + yarn patch-package |
| 223 | +
|
| 224 | + # we don't collect coverage for these tests on purpose |
| 225 | + - name: Run unit tests for ${{ matrix.package }} |
| 226 | + run: npx nx test @typescript-eslint/${{ matrix.package }} --coverage=false |
| 227 | + env: |
| 228 | + CI: true |
| 229 | + |
| 230 | + unit_tests_eslint_regression: |
| 231 | + name: Run Unit Tests (ESLint Version Regression Checks) |
| 232 | + needs: [build] |
| 233 | + runs-on: ubuntu-latest |
| 234 | + strategy: |
| 235 | + matrix: |
| 236 | + package: |
| 237 | + # note that we don't regression test all packages here on purpose because most don't depend on ESLint directly. |
| 238 | + ['eslint-plugin', 'utils'] |
| 239 | + eslint-version: |
| 240 | + # unfortunately you can't reference environment variables in an array :( |
| 241 | + [ |
| 242 | + # lowest possible version |
| 243 | + '6.0.0', |
| 244 | + # somewhere in the middle for sanity check |
| 245 | + '~7.32.0', |
| 246 | + # highest possible version |
| 247 | + '^8.0.0', |
| 248 | + ] |
| 249 | + env: |
| 250 | + # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app |
| 251 | + NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' |
| 252 | + COLLECT_COVERAGE: false |
| 253 | + steps: |
| 254 | + - name: Checkout |
| 255 | + uses: actions/checkout@v3 |
| 256 | + with: |
| 257 | + fetch-depth: 2 |
| 258 | + - name: Install |
| 259 | + uses: ./.github/actions/prepare-install |
| 260 | + with: |
| 261 | + node-version: ${{ env.PRIMARY_NODE_VERSION }} |
| 262 | + - name: Build |
| 263 | + uses: ./.github/actions/prepare-build |
| 264 | + |
| 265 | + - name: Install Specific ESLint Version |
| 266 | + run: yarn add -DW --ignore-engines --ignore-scripts eslint@${{ matrix.eslint-version }} |
| 267 | + |
| 268 | + # we don't collect coverage for these tests on purpose |
| 269 | + - name: Run unit tests for ${{ matrix.package }} |
| 270 | + run: npx nx test @typescript-eslint/${{ matrix.package }} --coverage=false |
| 271 | + env: |
| 272 | + CI: true |
| 273 | + |
175 | 274 | website_tests:
|
176 | 275 | permissions:
|
177 | 276 | contents: read # to fetch code (actions/checkout)
|
|
0 commit comments