Skip to content

Commit

Permalink
ci: refactor lint command to benefit from nx parallelisation (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismmdev authored Feb 8, 2023
1 parent 4f57a9b commit 1af1503
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 21 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: setup eslint cache
uses: actions/cache@v3
with:
path: '**/.eslintcache'
key: eslint-${{github.sha}}
restore-keys: eslint-

- name: setup lerna cache
id: lerna-cache
uses: actions/cache@v3
Expand All @@ -50,13 +57,6 @@ jobs:
key: lerna-cache-${{github.sha}}
restore-keys: lerna-cache-

- name: setup eslint cache
uses: actions/cache@v3
with:
path: .eslintcache
key: eslint-${{github.sha}}
restore-keys: eslint-

- name: install dependencies
run: pnpm install

Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
.env.*.local

# Log files
pnpm-debug.log*
npm-debug.log*
yarn-debug.log*
*-debug.log*
yarn-error.log*

# Editor directories and files
Expand Down
8 changes: 6 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
"dependsOn": ["^build", "prebuild"],
"outputs": [
"{projectRoot}/dist",
"{projectRoot}/report",
"{projectRoot}/schemas",
"{projectRoot}/showcase",
"{projectRoot}/types",
"{projectRoot}/report"
"{projectRoot}/types"
]
},
"test": {
"outputs": ["{projectRoot}/coverage"]
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"postinstall": "lerna run build",
"postci": "lerna run build",
"build": "lerna run build",
"lint": "eslint packages --ext .ts,.tsx,.vue --quiet --cache --cache-strategy content",
"lint:fix": "eslint packages --ext .ts,.tsx,.vue --fix",
"lint": "lerna run lint -- --quiet --cache --cache-strategy content",
"lint:fix": "lerna run lint -- --fix",
"test": "lerna run test",
"serve": "lerna run serve",
"prepare-release:stable": "lerna version --conventional-commits --conventional-graduate --no-git-tag-version --yes",
Expand Down
3 changes: 2 additions & 1 deletion packages/deep-merge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"prebuild": "pnpm run clean",
"build": "tsc && tsc --project tsconfig.esm.json",
"clean": "rimraf dist && rimraf coverage",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"prepublishOnly": "pnpm run build",
"prebuild": "pnpm run clean",
"test": "jest"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/jest-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"build": "tsc",
"build:watch": "tsc --watch",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"prepublishOnly": "pnpm run build"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"build": "tsc && tsc --project tsconfig.esm.json",
"build:watch": "tsc --watch",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"prepublishOnly": "pnpm run build",
"test": "jest"
},
Expand Down
1 change: 1 addition & 0 deletions packages/react-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"build": "tsc",
"cypress:open": "cypress open --browser chrome",
"cypress:run": "cypress run --headless --browser chrome",
"lint": "eslint . --ext .ts,tsx",
"postbuild": "pnpm pack",
"prepublishOnly": "pnpm run build",
"test": "pnpm run test:unit && pnpm run test:e2e:ci",
Expand Down
3 changes: 2 additions & 1 deletion packages/storage-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
"preinstall": "npx only-allow pnpm",
"build": "tsc && tsc --project tsconfig.esm.json",
"build:watch": "tsc --watch",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"postbuild": "pnpm pack",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/x-adapter-platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
"build": "concurrently \"pnpm run build:*\" && pnpm run gen:docs",
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"postbuild": "pnpm pack",
"gen:model-docs": "api-extractor run -l",
"gen:typescript-docs": "api-documenter markdown -i report -o docs",
"gen:docs": "pnpm run gen:model-docs && pnpm run gen:typescript-docs",
"lint": "eslint . --ext .ts",
"test": "jest",
"postbuild": "pnpm pack",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/x-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
"build": "concurrently \"pnpm run build:*\"",
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"test": "jest",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/x-archetype-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest",
"prepublishOnly": "pnpm run build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/x-bus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest",
"prepublishOnly": "pnpm run build"
},
Expand Down
7 changes: 4 additions & 3 deletions packages/x-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
"serve": "vue-cli-service serve",
"build": "ts-node --project ./build/tsconfig.json ./build/build.ts",
"build:website": "vue-cli-service build",
"postbuild": "pnpm pack --pack-destination ..",
"gen:docs": "rimraf ./docs && pnpm run gen:typescript-docs && pnpm run gen:component-docs",
"gen:typescript-docs": "api-documenter markdown --input-folder dist/report --output-folder docs/API-reference/api",
"gen:component-docs": "vue-docgen",
"postbuild": "pnpm pack --pack-destination ..",
"prepublishOnly": "pnpm run build",
"lint": "eslint . --ext .ts,.vue",
"test:unit": "jest --silent && pnpm run test:unit-cypress",
"test:unit-jest": "jest",
"test:unit-cypress": "cypress run --component",
Expand All @@ -64,7 +64,8 @@
"cypress:open": "cypress open --e2e --browser chrome",
"cypress:open:firefox": "cypress open --e2e --browser firefox",
"cypress:open:component": "cypress open --component --browser chrome",
"cypress:open:component:firefox": "cypress open --component --browser firefox"
"cypress:open:component:firefox": "cypress open --component --browser firefox",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
"@empathyco/x-adapter": "^8.0.0-alpha.24",
Expand Down
1 change: 1 addition & 0 deletions packages/x-priority-queue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest",
"prepublishOnly": "pnpm run build"
},
Expand Down
1 change: 1 addition & 0 deletions packages/x-svg-converter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"prebuild": "rimraf dist ./*.tgz",
"build": "tsc --project tsconfig.build.json",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest -i"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/x-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"prebuild": "rimraf ./dist ./showcase ./*.tgz",
"build": "rollup -c && rollup -c demo/rollup.config.js",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts,.vue",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/x-translations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"preinstall": "npx only-allow pnpm",
"build": "tsc",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"test": "jest -i"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/x-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"build": "tsc --project tsconfig.cjs.json && tsc --project tsconfig.esm.json",
"test": "jest",
"postbuild": "pnpm pack",
"lint": "eslint . --ext .ts",
"prepublishOnly": "pnpm run build"
},
"dependencies": {
Expand Down

0 comments on commit 1af1503

Please sign in to comment.