Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
test: add regression testing against old TS and ESLint versions in the CI#5573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
f0461a9
fbd4cc2
a009b83
c27c67d
4019a17
41ec3de
dbfc0f0
0c1bac1
f3bdd5a
1503c91
9b4b3dd
3b2311c
f6de3ff
c7bf8cc
45a8830
c792fb9
72527e5
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -11,7 +11,9 @@ on: | ||
merge_group: | ||
env: | ||
PRIMARY_ESLINT_VERSION: '^8.0.0' | ||
PRIMARY_NODE_VERSION: 18 | ||
PRIMARY_TYPESCRIPT_VERSION: '~4.8.0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. side note that i hate that this is yet another thing for us to remember to keep in sync. | ||
# Only set the read-write token if we are on the main branch | ||
NX_CLOUD_ACCESS_TOKEN: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && secrets.NX_CLOUD_ACCESS_TOKEN }} | ||
@@ -61,6 +63,7 @@ jobs: | ||
needs: [install] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
lint-task: ['check-spelling', 'check-format', 'lint-markdown'] | ||
steps: | ||
@@ -80,6 +83,7 @@ jobs: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
lint-task: ['lint', 'typecheck'] | ||
steps: | ||
@@ -119,8 +123,10 @@ jobs: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# just run on the oldest and latest supported versions and assume the intermediate versions are good | ||
# unfortunately you can't reference environment variables in an array :( | ||
node-version: [14, 18] | ||
package: | ||
[ | ||
@@ -176,6 +182,104 @@ jobs: | ||
# Sadly 1 day is the minimum | ||
retention-days: 1 | ||
unit_tests_ts_regression: | ||
name: Run Unit Tests (TypeScript Version Regression Checks) | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package: | ||
# note that we don't regression test all packages here on purpose because most don't depend on TS directly. | ||
['eslint-plugin', 'scope-manager', 'type-utils', 'typescript-estree'] | ||
ts-version: | ||
# unfortunately you can't reference environment variables in an array :( | ||
[ | ||
# lowest possible version | ||
'4.2.4', | ||
# somewhere in the middle for sanity check | ||
'~4.5.5', | ||
# highest possible version | ||
'~4.8.2', | ||
] | ||
env: | ||
# Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app | ||
NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' | ||
COLLECT_COVERAGE: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Install | ||
uses: ./.github/actions/prepare-install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Build | ||
uses: ./.github/actions/prepare-build | ||
- name: Install Specific TS Version | ||
run: | | ||
yarn ts-node ./tools/change-ts-version.ts ${{ matrix.ts-version }} | ||
yarn --ignore-engines --ignore-scripts | ||
- name: Patch Packages | ||
if: matrix.ts-version == env.PRIMARY_TYPESCRIPT_VERSION | ||
run: | | ||
yarn patch-package | ||
# we don't collect coverage for these tests on purpose | ||
- name: Run unit tests for ${{ matrix.package }} | ||
run: npx nx test ${{ matrix.package }} --coverage=false | ||
env: | ||
CI: true | ||
unit_tests_eslint_regression: | ||
name: Run Unit Tests (ESLint Version Regression Checks) | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package: | ||
# note that we don't regression test all packages here on purpose because most don't depend on ESLint directly. | ||
['eslint-plugin', 'utils'] | ||
eslint-version: | ||
# unfortunately you can't reference environment variables in an array :( | ||
[ | ||
# lowest possible version | ||
'6.0.0', | ||
# somewhere in the middle for sanity check | ||
'7.32.0', | ||
# highest possible version | ||
'^8.0.0', | ||
] | ||
env: | ||
# Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app | ||
NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' | ||
COLLECT_COVERAGE: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Install | ||
uses: ./.github/actions/prepare-install | ||
with: | ||
node-version: ${{ env.PRIMARY_NODE_VERSION }} | ||
- name: Build | ||
uses: ./.github/actions/prepare-build | ||
- name: Install Specific ESLint Version | ||
run: yarn add -DW --ignore-engines --ignore-scripts eslint@${{ matrix.eslint-version }} | ||
# we don't collect coverage for these tests on purpose | ||
- name: Run unit tests for ${{ matrix.package }} | ||
run: npx nx test ${{ matrix.package }} --coverage=false | ||
env: | ||
CI: true | ||
website_tests: | ||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript": ">=4.9" | ||
} |
Uh oh!
There was an error while loading.Please reload this page.