chore: wip #23065
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
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 | |
permissions: | |
actions: read | |
contents: read | |
jobs: | |
main: | |
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: | |
- uses: actions/checkout@v4 | |
with: | |
filter: tree:0 | |
fetch-depth: 0 | |
- 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" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.PRIMARY_NODE_VERSION }} | |
cache: 'yarn' | |
- name: Install dependencies | |
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 |