[CI] Parallelize eslint to speed it up (#136972)

This commit is contained in:
Brian Seeders 2022-07-22 16:23:17 -04:00 committed by GitHub
parent 5cc74443e6
commit 20dec08bf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View file

@ -79,9 +79,9 @@ steps:
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
queue: n2-2-spot
queue: n2-8-spot
key: linting
timeout_in_minutes: 90
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'

View file

@ -31,9 +31,13 @@ steps:
- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
queue: n2-2
queue: n2-8-spot
key: linting
timeout_in_minutes: 90
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'

View file

@ -16,9 +16,9 @@ echo '--- Lint: eslint'
# after possibly commiting fixed files to the repo
set +e;
if is_pr && ! is_auto_commit_disabled; then
node scripts/eslint --no-cache --fix
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 6 node scripts/eslint --no-cache --fix
else
node scripts/eslint --no-cache
git ls-files | grep -E '\.(js|mjs|ts|tsx)$' | xargs -n 250 -P 6 node scripts/eslint --no-cache
fi
eslint_exit=$?