mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-13 12:57:12 -07:00
feat(ci): Parallelize linting and move to larger runner
This change parallelizes the linting tasks in package.json and moves the lint job to a larger runner for a significant performance improvement. It also fixes an infinite loop that was introduced during the refactoring.
This commit is contained in:
@@ -10,7 +10,7 @@ permissions:
|
||||
jobs:
|
||||
lint:
|
||||
name: 'Lint All'
|
||||
runs-on: 'ubuntu-latest'
|
||||
runs-on: 'gemini-cli-ubuntu-16-core'
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
|
||||
|
||||
+10
-2
@@ -41,10 +41,18 @@
|
||||
"test:integration:sandbox:none": "cross-env GEMINI_SANDBOX=false vitest run --root ./integration-tests",
|
||||
"test:integration:sandbox:docker": "cross-env GEMINI_SANDBOX=docker npm run build:sandbox && cross-env GEMINI_SANDBOX=docker vitest run --root ./integration-tests",
|
||||
"test:integration:sandbox:podman": "cross-env GEMINI_SANDBOX=podman vitest run --root ./integration-tests",
|
||||
"lint": "eslint . --ext .ts,.tsx && eslint integration-tests && eslint scripts",
|
||||
"lint": "node scripts/lint.js --eslint",
|
||||
"lint:eslint": "node scripts/lint.js --eslint",
|
||||
"lint:actionlint": "node scripts/lint.js --actionlint",
|
||||
"lint:shellcheck": "node scripts/lint.js --shellcheck",
|
||||
"lint:yamllint": "node scripts/lint.js --yamllint",
|
||||
"lint:prettier": "node scripts/lint.js --prettier",
|
||||
"lint:sensitive-keywords": "node scripts/lint.js --sensitive-keywords",
|
||||
"lint:tsconfig": "node scripts/lint.js --tsconfig",
|
||||
"lint:setup": "node scripts/lint.js --setup",
|
||||
"lint:fix": "eslint . --fix --ext .ts,.tsx && eslint integration-tests --fix && eslint scripts --fix && npm run format",
|
||||
"lint:ci": "npm run lint:all",
|
||||
"lint:all": "node scripts/lint.js",
|
||||
"lint:all": "npm run lint:setup && npm-run-all --parallel lint:eslint lint:actionlint lint:shellcheck lint:yamllint lint:prettier lint:sensitive-keywords lint:tsconfig",
|
||||
"format": "prettier --experimental-cli --write .",
|
||||
"typecheck": "npm run typecheck --workspaces --if-present",
|
||||
"preflight": "npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci",
|
||||
|
||||
+5
-1
@@ -142,7 +142,11 @@ export function setupLinters() {
|
||||
|
||||
export function runESLint() {
|
||||
console.log('\nRunning ESLint...');
|
||||
if (!runCommand('npm run lint')) {
|
||||
if (
|
||||
!runCommand(
|
||||
'eslint . --ext .ts,.tsx && eslint integration-tests && eslint scripts',
|
||||
)
|
||||
) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user