From b9cad4c67d520ef59081b140efee130049bfed2c Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Tue, 1 Jul 2025 18:10:41 +0400 Subject: [PATCH 01/12] chore: wip --- .github/workflows/ci.yml | 302 ++----------------------------- .github/workflows/ci__old.yml | 326 ++++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+), 288 deletions(-) create mode 100644 .github/workflows/ci__old.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc7c9d47147e..2208c71c2192 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,6 @@ on: branches: - main pull_request: - branches: - - '**' - merge_group: concurrency: group: '${{ github.workflow }} - ${{ github.head_ref || github.ref }}' @@ -23,304 +20,33 @@ env: defaults: run: shell: bash - -# -# Workflow for how the CI spawns jobs: -# 1) Run the install and cache the install artefacts -# 2) Run the build and cache the output -# - In parallel we also any steps that don't need the build (like prettier) -# 3) Run the steps that depend on the build -# - permissions: - contents: read # to fetch code (actions/checkout) + actions: read + contents: read jobs: - install: - name: Checkout and Install - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - build: - name: Build All Packages - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [install] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Build - uses: ./.github/actions/prepare-build - - generate_configs: - name: Generate Configs - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - run: yarn nx run generate-configs - - run: git status --porcelain - - if: failure() - run: echo "Outdated result detected from yarn generate-configs. Please check in any file changes." - - lint_without_build: - name: Lint without build - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [install] - runs-on: ubuntu-latest - strategy: - matrix: - lint-task: ['check-spelling', 'check-format', 'lint-markdown'] - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - - name: Run Check - run: yarn ${{ matrix.lint-task }} - - lint_with_build: - name: Lint with build - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - # because we lint with our own tooling, we need to build - needs: [build] - runs-on: ubuntu-latest - strategy: - matrix: - lint-task: ['lint', 'typecheck', 'knip'] - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Build - uses: ./.github/actions/prepare-build - - - name: Run Check - run: yarn ${{ matrix.lint-task }} - env: - ESLINT_USE_FLAT_CONFIG: true - - stylelint: - name: Stylelint - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [install] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Run stylelint check - run: yarn stylelint - working-directory: packages/website - - integration_tests: - name: Run integration tests on primary Node.js version - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Build - uses: ./.github/actions/prepare-build - - - name: Run integration tests - run: yarn test-integration - env: - CI: true - - unit_tests: - name: Run Unit Tests - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ${{ matrix.os }} - strategy: - matrix: - exclude: - - os: windows-latest - node-version: 18 - os: [ubuntu-latest, windows-latest] - # just run on the oldest and latest supported versions and assume the intermediate versions are good - node-version: [18, 20] - package: - [ - 'ast-spec', - 'eslint-plugin', - 'eslint-plugin-internal', - 'parser', - 'project-service', - 'rule-tester', - 'scope-manager', - 'tsconfig-utils', - 'type-utils', - 'typescript-eslint', - 'typescript-estree', - 'utils', - 'visitor-keys', - ] - env: - NX_CI_EXECUTION_ENV: '${{ matrix.os }} - Node ${{ matrix.node-version }}' - COLLECT_COVERAGE: false - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ matrix.node-version }} - - name: Build - uses: ./.github/actions/prepare-build - - # collect coverage on the primary node version - # we don't collect coverage on other node versions so they run faster - - name: Run unit tests with coverage for ${{ matrix.package }} - if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' - run: yarn nx run ${{ matrix.package }}:test -- --coverage - env: - CI: true - - name: Run unit tests for ${{ matrix.package }} - if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' - run: yarn nx test ${{ matrix.package }} - env: - CI: true - - - name: Store coverage for uploading - if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.package }}-coverage - path: packages/${{ matrix.package }}/coverage/lcov.info - # Sadly 1 day is the minimum - retention-days: 1 - - unit_tests_project_service: - name: Run Unit Tests with Project Service + main: environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] runs-on: ubuntu-latest - strategy: - matrix: - package: - ['eslint-plugin', 'eslint-plugin-internal', 'typescript-estree'] env: NX_CI_EXECUTION_ENV: 'ubuntu-latest' - COLLECT_COVERAGE: false, steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Install - uses: ./.github/actions/prepare-install + - uses: actions/checkout@v4 with: - node-version: 18 - - name: Build - uses: ./.github/actions/prepare-build - - name: Run unit tests for ${{ matrix.package }} - run: yarn nx test ${{ matrix.package }} --coverage=false - env: - CI: true - TYPESCRIPT_ESLINT_PROJECT_SERVICE: true + filter: tree:0 + fetch-depth: 0 - upload_coverage: - name: Upload Codecov Coverage - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [unit_tests] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Download coverage reports - uses: actions/download-artifact@v4 - with: - path: coverage - - - name: Publish code coverage report - uses: codecov/codecov-action@v4.6.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage/**/lcov.info - flags: unittest - name: codecov + - run: corepack enable - publish_canary_version: - name: Publish the latest code as a canary version - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - runs-on: ubuntu-latest - permissions: - id-token: write - needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] - if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 # we need the tags to be available + # Enable task distribution via Nx Cloud + - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build" - - name: Install - uses: ./.github/actions/prepare-install + - uses: actions/setup-node@v4 with: node-version: ${{ env.PRIMARY_NODE_VERSION }} - registry-url: 'https://registry.npmjs.org' - - - name: Build - uses: ./.github/actions/prepare-build + cache: 'yarn' - - name: Figure out and apply the next canary version - run: npx tsx tools/release/apply-canary-version.mts + - name: Install dependencies + run: yarn install --immutable - - name: Publish all packages to npm with the canary tag - # NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used - run: npx nx release publish --tag canary --verbose - env: - NX_CLOUD_DISTRIBUTED_EXECUTION: false - # This secret is only accessible on the GitHub environment "main" - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true + - run: yarn nx affected -t build diff --git a/.github/workflows/ci__old.yml b/.github/workflows/ci__old.yml new file mode 100644 index 000000000000..bc7c9d47147e --- /dev/null +++ b/.github/workflows/ci__old.yml @@ -0,0 +1,326 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - '**' + merge_group: + +concurrency: + group: '${{ github.workflow }} - ${{ github.head_ref || github.ref }}' + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +env: + PRIMARY_NODE_VERSION: 20 + # Value will be controlled via GitHub environment (called "main") secret, will be read-write for main branch, read-only for other branches + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} + # This increases the verbosity of the logs for everything, including Nx Cloud, but will hopefully surface more info about recent lint failures + NX_VERBOSE_LOGGING: false + +defaults: + run: + shell: bash + +# +# Workflow for how the CI spawns jobs: +# 1) Run the install and cache the install artefacts +# 2) Run the build and cache the output +# - In parallel we also any steps that don't need the build (like prettier) +# 3) Run the steps that depend on the build +# + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + install: + name: Checkout and Install + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + runs-on: ubuntu-latest + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + + build: + name: Build All Packages + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [install] + runs-on: ubuntu-latest + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + - name: Build + uses: ./.github/actions/prepare-build + + generate_configs: + name: Generate Configs + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [build] + runs-on: ubuntu-latest + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + - run: yarn nx run generate-configs + - run: git status --porcelain + - if: failure() + run: echo "Outdated result detected from yarn generate-configs. Please check in any file changes." + + lint_without_build: + name: Lint without build + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [install] + runs-on: ubuntu-latest + strategy: + matrix: + lint-task: ['check-spelling', 'check-format', 'lint-markdown'] + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + + - name: Run Check + run: yarn ${{ matrix.lint-task }} + + lint_with_build: + name: Lint with build + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + # because we lint with our own tooling, we need to build + needs: [build] + runs-on: ubuntu-latest + strategy: + matrix: + lint-task: ['lint', 'typecheck', 'knip'] + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + - name: Build + uses: ./.github/actions/prepare-build + + - name: Run Check + run: yarn ${{ matrix.lint-task }} + env: + ESLINT_USE_FLAT_CONFIG: true + + stylelint: + name: Stylelint + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [install] + runs-on: ubuntu-latest + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + - name: Run stylelint check + run: yarn stylelint + working-directory: packages/website + + integration_tests: + name: Run integration tests on primary Node.js version + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [build] + runs-on: ubuntu-latest + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + - name: Build + uses: ./.github/actions/prepare-build + + - name: Run integration tests + run: yarn test-integration + env: + CI: true + + unit_tests: + name: Run Unit Tests + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [build] + runs-on: ${{ matrix.os }} + strategy: + matrix: + exclude: + - os: windows-latest + node-version: 18 + os: [ubuntu-latest, windows-latest] + # just run on the oldest and latest supported versions and assume the intermediate versions are good + node-version: [18, 20] + package: + [ + 'ast-spec', + 'eslint-plugin', + 'eslint-plugin-internal', + 'parser', + 'project-service', + 'rule-tester', + 'scope-manager', + 'tsconfig-utils', + 'type-utils', + 'typescript-eslint', + 'typescript-estree', + 'utils', + 'visitor-keys', + ] + env: + NX_CI_EXECUTION_ENV: '${{ matrix.os }} - Node ${{ matrix.node-version }}' + COLLECT_COVERAGE: false + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ matrix.node-version }} + - name: Build + uses: ./.github/actions/prepare-build + + # collect coverage on the primary node version + # we don't collect coverage on other node versions so they run faster + - name: Run unit tests with coverage for ${{ matrix.package }} + if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' + run: yarn nx run ${{ matrix.package }}:test -- --coverage + env: + CI: true + - name: Run unit tests for ${{ matrix.package }} + if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' + run: yarn nx test ${{ matrix.package }} + env: + CI: true + + - name: Store coverage for uploading + if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.package }}-coverage + path: packages/${{ matrix.package }}/coverage/lcov.info + # Sadly 1 day is the minimum + retention-days: 1 + + unit_tests_project_service: + name: Run Unit Tests with Project Service + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [build] + runs-on: ubuntu-latest + strategy: + matrix: + package: + ['eslint-plugin', 'eslint-plugin-internal', 'typescript-estree'] + env: + NX_CI_EXECUTION_ENV: 'ubuntu-latest' + COLLECT_COVERAGE: false, + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: 18 + - name: Build + uses: ./.github/actions/prepare-build + - name: Run unit tests for ${{ matrix.package }} + run: yarn nx test ${{ matrix.package }} --coverage=false + env: + CI: true + TYPESCRIPT_ESLINT_PROJECT_SERVICE: true + + upload_coverage: + name: Upload Codecov Coverage + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + needs: [unit_tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download coverage reports + uses: actions/download-artifact@v4 + with: + path: coverage + + - name: Publish code coverage report + uses: codecov/codecov-action@v4.6.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage/**/lcov.info + flags: unittest + name: codecov + + publish_canary_version: + name: Publish the latest code as a canary version + environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job + runs-on: ubuntu-latest + permissions: + id-token: write + needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] + if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # we need the tags to be available + + - name: Install + uses: ./.github/actions/prepare-install + with: + node-version: ${{ env.PRIMARY_NODE_VERSION }} + registry-url: 'https://registry.npmjs.org' + + - name: Build + uses: ./.github/actions/prepare-build + + - name: Figure out and apply the next canary version + run: npx tsx tools/release/apply-canary-version.mts + + - name: Publish all packages to npm with the canary tag + # NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used + run: npx nx release publish --tag canary --verbose + env: + NX_CLOUD_DISTRIBUTED_EXECUTION: false + # This secret is only accessible on the GitHub environment "main" + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: true From 1e559d3560c7c28585624954d01c7e08d5827d88 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Tue, 1 Jul 2025 18:13:49 +0400 Subject: [PATCH 02/12] chore: wip --- .github/workflows/ci__old.yml | 596 +++++++++++++++++----------------- 1 file changed, 298 insertions(+), 298 deletions(-) diff --git a/.github/workflows/ci__old.yml b/.github/workflows/ci__old.yml index bc7c9d47147e..7a9928b49eaf 100644 --- a/.github/workflows/ci__old.yml +++ b/.github/workflows/ci__old.yml @@ -1,326 +1,326 @@ -name: CI +# name: CI -on: - push: - branches: - - main - pull_request: - branches: - - '**' - merge_group: +# on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - '**' +# merge_group: -concurrency: - group: '${{ github.workflow }} - ${{ github.head_ref || github.ref }}' - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} +# concurrency: +# group: '${{ github.workflow }} - ${{ github.head_ref || github.ref }}' +# cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} -env: - PRIMARY_NODE_VERSION: 20 - # Value will be controlled via GitHub environment (called "main") secret, will be read-write for main branch, read-only for other branches - NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - # This increases the verbosity of the logs for everything, including Nx Cloud, but will hopefully surface more info about recent lint failures - NX_VERBOSE_LOGGING: false +# env: +# PRIMARY_NODE_VERSION: 20 +# # Value will be controlled via GitHub environment (called "main") secret, will be read-write for main branch, read-only for other branches +# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} +# # This increases the verbosity of the logs for everything, including Nx Cloud, but will hopefully surface more info about recent lint failures +# NX_VERBOSE_LOGGING: false -defaults: - run: - shell: bash +# defaults: +# run: +# shell: bash -# -# Workflow for how the CI spawns jobs: -# 1) Run the install and cache the install artefacts -# 2) Run the build and cache the output -# - In parallel we also any steps that don't need the build (like prettier) -# 3) Run the steps that depend on the build -# +# # +# # Workflow for how the CI spawns jobs: +# # 1) Run the install and cache the install artefacts +# # 2) Run the build and cache the output +# # - In parallel we also any steps that don't need the build (like prettier) +# # 3) Run the steps that depend on the build +# # -permissions: - contents: read # to fetch code (actions/checkout) +# permissions: +# contents: read # to fetch code (actions/checkout) -jobs: - install: - name: Checkout and Install - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} +# jobs: +# install: +# name: Checkout and Install +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# runs-on: ubuntu-latest +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} - build: - name: Build All Packages - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [install] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Build - uses: ./.github/actions/prepare-build +# build: +# name: Build All Packages +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [install] +# runs-on: ubuntu-latest +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} +# - name: Build +# uses: ./.github/actions/prepare-build - generate_configs: - name: Generate Configs - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - run: yarn nx run generate-configs - - run: git status --porcelain - - if: failure() - run: echo "Outdated result detected from yarn generate-configs. Please check in any file changes." +# generate_configs: +# name: Generate Configs +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [build] +# runs-on: ubuntu-latest +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} +# - run: yarn nx run generate-configs +# - run: git status --porcelain +# - if: failure() +# run: echo "Outdated result detected from yarn generate-configs. Please check in any file changes." - lint_without_build: - name: Lint without build - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [install] - runs-on: ubuntu-latest - strategy: - matrix: - lint-task: ['check-spelling', 'check-format', 'lint-markdown'] - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} +# lint_without_build: +# name: Lint without build +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [install] +# runs-on: ubuntu-latest +# strategy: +# matrix: +# lint-task: ['check-spelling', 'check-format', 'lint-markdown'] +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Run Check - run: yarn ${{ matrix.lint-task }} +# - name: Run Check +# run: yarn ${{ matrix.lint-task }} - lint_with_build: - name: Lint with build - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - # because we lint with our own tooling, we need to build - needs: [build] - runs-on: ubuntu-latest - strategy: - matrix: - lint-task: ['lint', 'typecheck', 'knip'] - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Build - uses: ./.github/actions/prepare-build +# lint_with_build: +# name: Lint with build +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# # because we lint with our own tooling, we need to build +# needs: [build] +# runs-on: ubuntu-latest +# strategy: +# matrix: +# lint-task: ['lint', 'typecheck', 'knip'] +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} +# - name: Build +# uses: ./.github/actions/prepare-build - - name: Run Check - run: yarn ${{ matrix.lint-task }} - env: - ESLINT_USE_FLAT_CONFIG: true +# - name: Run Check +# run: yarn ${{ matrix.lint-task }} +# env: +# ESLINT_USE_FLAT_CONFIG: true - stylelint: - name: Stylelint - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [install] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Run stylelint check - run: yarn stylelint - working-directory: packages/website +# stylelint: +# name: Stylelint +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [install] +# runs-on: ubuntu-latest +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} +# - name: Run stylelint check +# run: yarn stylelint +# working-directory: packages/website - integration_tests: - name: Run integration tests on primary Node.js version - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ubuntu-latest - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - - name: Build - uses: ./.github/actions/prepare-build +# integration_tests: +# name: Run integration tests on primary Node.js version +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [build] +# runs-on: ubuntu-latest +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} +# - name: Build +# uses: ./.github/actions/prepare-build - - name: Run integration tests - run: yarn test-integration - env: - CI: true +# - name: Run integration tests +# run: yarn test-integration +# env: +# CI: true - unit_tests: - name: Run Unit Tests - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ${{ matrix.os }} - strategy: - matrix: - exclude: - - os: windows-latest - node-version: 18 - os: [ubuntu-latest, windows-latest] - # just run on the oldest and latest supported versions and assume the intermediate versions are good - node-version: [18, 20] - package: - [ - 'ast-spec', - 'eslint-plugin', - 'eslint-plugin-internal', - 'parser', - 'project-service', - 'rule-tester', - 'scope-manager', - 'tsconfig-utils', - 'type-utils', - 'typescript-eslint', - 'typescript-estree', - 'utils', - 'visitor-keys', - ] - env: - NX_CI_EXECUTION_ENV: '${{ matrix.os }} - Node ${{ matrix.node-version }}' - COLLECT_COVERAGE: false - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ matrix.node-version }} - - name: Build - uses: ./.github/actions/prepare-build +# unit_tests: +# name: Run Unit Tests +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [build] +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# exclude: +# - os: windows-latest +# node-version: 18 +# os: [ubuntu-latest, windows-latest] +# # just run on the oldest and latest supported versions and assume the intermediate versions are good +# node-version: [18, 20] +# package: +# [ +# 'ast-spec', +# 'eslint-plugin', +# 'eslint-plugin-internal', +# 'parser', +# 'project-service', +# 'rule-tester', +# 'scope-manager', +# 'tsconfig-utils', +# 'type-utils', +# 'typescript-eslint', +# 'typescript-estree', +# 'utils', +# 'visitor-keys', +# ] +# env: +# NX_CI_EXECUTION_ENV: '${{ matrix.os }} - Node ${{ matrix.node-version }}' +# COLLECT_COVERAGE: false +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 2 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ matrix.node-version }} +# - name: Build +# uses: ./.github/actions/prepare-build - # collect coverage on the primary node version - # we don't collect coverage on other node versions so they run faster - - name: Run unit tests with coverage for ${{ matrix.package }} - if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' - run: yarn nx run ${{ matrix.package }}:test -- --coverage - env: - CI: true - - name: Run unit tests for ${{ matrix.package }} - if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' - run: yarn nx test ${{ matrix.package }} - env: - CI: true +# # collect coverage on the primary node version +# # we don't collect coverage on other node versions so they run faster +# - name: Run unit tests with coverage for ${{ matrix.package }} +# if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' +# run: yarn nx run ${{ matrix.package }}:test -- --coverage +# env: +# CI: true +# - name: Run unit tests for ${{ matrix.package }} +# if: env.PRIMARY_NODE_VERSION != matrix.node-version || matrix.os != 'ubuntu-latest' +# run: yarn nx test ${{ matrix.package }} +# env: +# CI: true - - name: Store coverage for uploading - if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.package }}-coverage - path: packages/${{ matrix.package }}/coverage/lcov.info - # Sadly 1 day is the minimum - retention-days: 1 +# - name: Store coverage for uploading +# if: env.PRIMARY_NODE_VERSION == matrix.node-version && matrix.os == 'ubuntu-latest' +# uses: actions/upload-artifact@v4 +# with: +# name: ${{ matrix.package }}-coverage +# path: packages/${{ matrix.package }}/coverage/lcov.info +# # Sadly 1 day is the minimum +# retention-days: 1 - unit_tests_project_service: - name: Run Unit Tests with Project Service - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [build] - runs-on: ubuntu-latest - strategy: - matrix: - package: - ['eslint-plugin', 'eslint-plugin-internal', 'typescript-estree'] - env: - NX_CI_EXECUTION_ENV: 'ubuntu-latest' - COLLECT_COVERAGE: false, - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: 18 - - name: Build - uses: ./.github/actions/prepare-build - - name: Run unit tests for ${{ matrix.package }} - run: yarn nx test ${{ matrix.package }} --coverage=false - env: - CI: true - TYPESCRIPT_ESLINT_PROJECT_SERVICE: true +# unit_tests_project_service: +# name: Run Unit Tests with Project Service +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [build] +# runs-on: ubuntu-latest +# strategy: +# matrix: +# package: +# ['eslint-plugin', 'eslint-plugin-internal', 'typescript-estree'] +# env: +# NX_CI_EXECUTION_ENV: 'ubuntu-latest' +# COLLECT_COVERAGE: false, +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 2 +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: 18 +# - name: Build +# uses: ./.github/actions/prepare-build +# - name: Run unit tests for ${{ matrix.package }} +# run: yarn nx test ${{ matrix.package }} --coverage=false +# env: +# CI: true +# TYPESCRIPT_ESLINT_PROJECT_SERVICE: true - upload_coverage: - name: Upload Codecov Coverage - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - needs: [unit_tests] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 +# upload_coverage: +# name: Upload Codecov Coverage +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# needs: [unit_tests] +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v4 - - name: Download coverage reports - uses: actions/download-artifact@v4 - with: - path: coverage +# - name: Download coverage reports +# uses: actions/download-artifact@v4 +# with: +# path: coverage - - name: Publish code coverage report - uses: codecov/codecov-action@v4.6.0 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage/**/lcov.info - flags: unittest - name: codecov +# - name: Publish code coverage report +# uses: codecov/codecov-action@v4.6.0 +# with: +# token: ${{ secrets.CODECOV_TOKEN }} +# files: coverage/**/lcov.info +# flags: unittest +# name: codecov - publish_canary_version: - name: Publish the latest code as a canary version - environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job - runs-on: ubuntu-latest - permissions: - id-token: write - needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] - if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 # we need the tags to be available +# publish_canary_version: +# name: Publish the latest code as a canary version +# environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job +# runs-on: ubuntu-latest +# permissions: +# id-token: write +# needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] +# if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main' +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 # we need the tags to be available - - name: Install - uses: ./.github/actions/prepare-install - with: - node-version: ${{ env.PRIMARY_NODE_VERSION }} - registry-url: 'https://registry.npmjs.org' +# - name: Install +# uses: ./.github/actions/prepare-install +# with: +# node-version: ${{ env.PRIMARY_NODE_VERSION }} +# registry-url: 'https://registry.npmjs.org' - - name: Build - uses: ./.github/actions/prepare-build +# - name: Build +# uses: ./.github/actions/prepare-build - - name: Figure out and apply the next canary version - run: npx tsx tools/release/apply-canary-version.mts +# - name: Figure out and apply the next canary version +# run: npx tsx tools/release/apply-canary-version.mts - - name: Publish all packages to npm with the canary tag - # NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used - run: npx nx release publish --tag canary --verbose - env: - NX_CLOUD_DISTRIBUTED_EXECUTION: false - # This secret is only accessible on the GitHub environment "main" - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_CONFIG_PROVENANCE: true +# - name: Publish all packages to npm with the canary tag +# # NOTE: this needs to be npx, rather than yarn, to make sure the authenticated npm registry is used +# run: npx nx release publish --tag canary --verbose +# env: +# NX_CLOUD_DISTRIBUTED_EXECUTION: false +# # This secret is only accessible on the GitHub environment "main" +# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} +# NPM_CONFIG_PROVENANCE: true From ae276dd4b6a4120bb176845f349d0e35d765892e Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Tue, 1 Jul 2025 18:19:16 +0400 Subject: [PATCH 03/12] chore: wip --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2208c71c2192..d07622725aeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,16 @@ jobs: cache: 'yarn' - name: Install dependencies - run: yarn install --immutable + run: | + yarn install --immutable --inline-builds + yarn check-clean-workspace-after-install + env: + # CI optimizations. Overrides yarnrc.yml options (or their defaults) in the CI action. + YARN_ENABLE_GLOBAL_CACHE: 'false' # Use local cache folder to keep downloaded archives + YARN_NM_MODE: 'hardlinks-local' # Hardlinks-(local|global) reduces io / node_modules size + YARN_INSTALL_STATE_PATH: .yarn/ci-cache/install-state.gz # Very small speedup when lock does not change + # Other environment variables + HUSKY: '0' # By default do not run HUSKY install + SKIP_POSTINSTALL: 'true' - run: yarn nx affected -t build From 942b238e3818f4e2f6a607a5870ea750078b3856 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Tue, 1 Jul 2025 18:24:36 +0400 Subject: [PATCH 04/12] chore: wip --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d07622725aeb..6abf23a6e39d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,8 @@ jobs: # Enable task distribution via Nx Cloud - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build" + - uses: nrwl/nx-set-shas@v4 + - uses: actions/setup-node@v4 with: node-version: ${{ env.PRIMARY_NODE_VERSION }} From 68af5032a35b99b297b9b8eeeea391a4a52d28c3 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Tue, 1 Jul 2025 18:38:19 +0400 Subject: [PATCH 05/12] chore: wip --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6abf23a6e39d..a61ead1dea4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,11 @@ jobs: - run: corepack enable # Enable task distribution via Nx Cloud - - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build" + - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" + env: + SKIP_POSTINSTALL: 'true' # Skip postinstall scripts on Nx Agents + GIT_FETCH_TAGS: 'true' # Fetch all tags on checkout on Nx Agents + HUSKY: '0' # Do not run husky install on Nx Agents - uses: nrwl/nx-set-shas@v4 @@ -61,4 +65,5 @@ jobs: HUSKY: '0' # By default do not run HUSKY install SKIP_POSTINSTALL: 'true' - - run: yarn nx affected -t build + # Website will be built by the Netlify GitHub App + - run: yarn nx run-many --target=build --exclude=website --exclude=website-eslint From 0a983eb9b6ff1641e97cb4c60c41c641a8f8df08 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 14:56:00 +0400 Subject: [PATCH 06/12] chore: more tasks --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a61ead1dea4a..8b05ae299b0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ permissions: contents: read jobs: - main: + linux-main: environment: ${{ (github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main') && 'main' || '' }} # Have to specify per job runs-on: ubuntu-latest env: @@ -65,5 +65,12 @@ jobs: HUSKY: '0' # By default do not run HUSKY install SKIP_POSTINSTALL: 'true' - # Website will be built by the Netlify GitHub App - - run: yarn nx run-many --target=build --exclude=website --exclude=website-eslint + # Trigger as many tasks as possible in parallel and let Nx Cloud orchestrate them based on their dependency relationships + - run: | + # Type-checking and linting + yarn nx run-many -t typecheck lint & + # Build (NOTE: website will be built by the Netlify GitHub App) + yarn nx run-many -t build --exclude=website --exclude=website-eslint & + # Unit tests with Project Service enabled + TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --include eslint-plugin eslint-plugin-internal typescript-estree & + wait From e1103cc337f76fe66be7b179d3db9e9db8fc5b5f Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 15:06:22 +0400 Subject: [PATCH 07/12] chore: more tasks --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b05ae299b0b..336a3e960f92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,5 +72,5 @@ jobs: # Build (NOTE: website will be built by the Netlify GitHub App) yarn nx run-many -t build --exclude=website --exclude=website-eslint & # Unit tests with Project Service enabled - TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --include eslint-plugin eslint-plugin-internal typescript-estree & + TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --projects eslint-plugin eslint-plugin-internal typescript-estree & wait From 12b67b17ef30e5589c1457443cdcdabea2d379e0 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 15:29:56 +0400 Subject: [PATCH 08/12] chore: wip --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 336a3e960f92..3d77a7083e8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - run: corepack enable # Enable task distribution via Nx Cloud - - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" + - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build,test,typecheck,lint" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" env: SKIP_POSTINSTALL: 'true' # Skip postinstall scripts on Nx Agents GIT_FETCH_TAGS: 'true' # Fetch all tags on checkout on Nx Agents From e56951124ec0fb4d9d2525a0764c7b37742c4386 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 15:39:44 +0400 Subject: [PATCH 09/12] chore: wip --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d77a7083e8c..f69bdb707f4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,5 +72,5 @@ jobs: # Build (NOTE: website will be built by the Netlify GitHub App) yarn nx run-many -t build --exclude=website --exclude=website-eslint & # Unit tests with Project Service enabled - TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --projects eslint-plugin eslint-plugin-internal typescript-estree & + CI=true COLLECT_COVERAGE=false TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --coverage=false --projects eslint-plugin eslint-plugin-internal typescript-estree & wait From 5870df0898ad4382d13cf15085214e1070c9bb1e Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 15:52:46 +0400 Subject: [PATCH 10/12] chore: wip --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f69bdb707f4f..f430b61453d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - run: corepack enable # Enable task distribution via Nx Cloud - - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-medium-js" --stop-agents-after="build,test,typecheck,lint" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" + - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-large-js" --stop-agents-after="build,test,typecheck,lint" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" env: SKIP_POSTINSTALL: 'true' # Skip postinstall scripts on Nx Agents GIT_FETCH_TAGS: 'true' # Fetch all tags on checkout on Nx Agents From 3ff0a6970a6330c5186d937166dc460fe3c3872b Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 16:13:14 +0400 Subject: [PATCH 11/12] chore: wip --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f430b61453d1..93b437c71a7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - run: corepack enable # Enable task distribution via Nx Cloud - - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-large-js" --stop-agents-after="build,test,typecheck,lint" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" + - run: yarn dlx nx-cloud start-ci-run --distribute-on="10 linux-large-js" --stop-agents-after="build,test,lint" --with-env-vars="SKIP_POSTINSTALL,GIT_FETCH_TAGS,HUSKY" env: SKIP_POSTINSTALL: 'true' # Skip postinstall scripts on Nx Agents GIT_FETCH_TAGS: 'true' # Fetch all tags on checkout on Nx Agents @@ -67,8 +67,8 @@ jobs: # Trigger as many tasks as possible in parallel and let Nx Cloud orchestrate them based on their dependency relationships - run: | - # Type-checking and linting - yarn nx run-many -t typecheck lint & + # Linting + yarn nx run-many -t lint & # Build (NOTE: website will be built by the Netlify GitHub App) yarn nx run-many -t build --exclude=website --exclude=website-eslint & # Unit tests with Project Service enabled From 993c882d319ec8fe1820a2e462c63555c7db5b45 Mon Sep 17 00:00:00 2001 From: JamesHenry Date: Sat, 5 Jul 2025 16:52:41 +0400 Subject: [PATCH 12/12] chore: wip --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93b437c71a7c..7a5688a48ecc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,10 +67,10 @@ jobs: # Trigger as many tasks as possible in parallel and let Nx Cloud orchestrate them based on their dependency relationships - run: | - # Linting - yarn nx run-many -t lint & + # Linting (failing on main) + # yarn nx run-many -t lint & # Build (NOTE: website will be built by the Netlify GitHub App) yarn nx run-many -t build --exclude=website --exclude=website-eslint & # Unit tests with Project Service enabled - CI=true COLLECT_COVERAGE=false TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --coverage=false --projects eslint-plugin eslint-plugin-internal typescript-estree & + TYPESCRIPT_ESLINT_PROJECT_SERVICE=true yarn nx run-many -t test --coverage=false --projects eslint-plugin eslint-plugin-internal typescript-estree & wait