Skip to content

Commit 96607ba

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] ESLint running as matrix.
[CONFIG] [Github Actions] NodeJS rewrite.
1 parent e870f4b commit 96607ba

File tree

5 files changed

+40
-19
lines changed

5 files changed

+40
-19
lines changed

.github/workflows/eslint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ on: # yamllint disable-line rule:truthy
3232
jobs:
3333
eslint:
3434
name: Run eslint scanning
35-
runs-on: ubuntu-24.04
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
matrix:
38+
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
39+
node-version: [18.x, 20.x, 22.x]
40+
# See supported Node.js release schedule
41+
# at https://nodejs.org/en/about/releases/
3642
permissions:
3743
contents: read
3844
security-events: write

.github/workflows/node-coverage.js.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ jobs:
2828
- name: Install dependencies
2929
run: npm ci --verbose
3030

31-
- name: Lint
32-
run: npm run lint
33-
3431
- name: Run the tests
3532
run: npm run jest:ci -- --coverage
3633

.github/workflows/node.js.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
name: Node.js CI Tests
43

54
on: # yamllint disable-line rule:truthy
@@ -13,7 +12,7 @@ on: # yamllint disable-line rule:truthy
1312
jobs:
1413
build:
1514
name: NodeJS Jest CI Test
16-
runs-on: ubuntu-24.04
15+
runs-on: ${{ matrix.os }}
1716
strategy:
1817
matrix:
1918
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
@@ -33,8 +32,5 @@ jobs:
3332
- name: Install dependencies
3433
run: npm ci --verbose
3534

36-
- name: Lint
37-
run: npm run lint
38-
3935
- name: Run the tests
4036
run: npm run jest:ci

package-lock.json

Lines changed: 24 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@types/eslint__js": "^8.42.3",
2121
"@types/jest": "^29.5.5",
2222
"@typescript-eslint/eslint-plugin": "^8.5.0",
23+
"cross-env": "^7.0.3",
2324
"eslint": "^8.57.1",
2425
"eslint-config-airbnb-base": "^15.0.0",
2526
"eslint-config-prettier": "^9.0.0",
@@ -36,13 +37,13 @@
3637
"scripts": {
3738
"build": "tsc -p tsconfig.prod.json",
3839
"start": "npm run test",
39-
"lint": "npx --yes eslint --env-info; npx --yes eslint . --color --max-warnings=0 && echo '✔ Your code looks good.'",
40-
"jest:ci": "node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
41-
"jest:clean": "npx --yes jest --clearCache && npx --yes watchman watch-del-all",
42-
"jest:bruteforce": "BRUTEFORCE=true node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
43-
"jest:watch": "node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug --watchAll",
44-
"style:format": "npx --yes prettier --write 'src/**/*.ts'",
45-
"style:check": "npx --yes prettier --check 'src/**/*.ts'",
40+
"lint": "npx eslint --env-info; npx eslint . --color --max-warnings=0 && echo '✔ Your code looks good.'",
41+
"jest:ci": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
42+
"jest:clean": "npx jest --clearCache && npx watchman watch-del-all",
43+
"jest:bruteforce": "cross-env BRUTEFORCE=true NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
44+
"jest:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug --watchAll",
45+
"style:format": "npx prettier --write 'src/**/*.ts'",
46+
"style:check": "npx prettier --check 'src/**/*.ts'",
4647
"test": "jest",
4748
"update-all": "npm install $(npm outdated | cut -d' ' -f 1 | sed '1d' | xargs -I '$' echo '$@latest' | xargs echo)"
4849
}

0 commit comments

Comments
 (0)