Skip to content

Commit

Permalink
[CONFIG] [Github Actions] ESLint running as matrix.
Browse files Browse the repository at this point in the history
[CONFIG] [Github Actions] NodeJS rewrite.
  • Loading branch information
Gonzalo Diaz committed Dec 11, 2024
1 parent e870f4b commit 96607ba
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 19 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ on: # yamllint disable-line rule:truthy
jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-24.04
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule
# at https://nodejs.org/en/about/releases/
permissions:
contents: read
security-events: write
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/node-coverage.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
- name: Install dependencies
run: npm ci --verbose

- name: Lint
run: npm run lint

- name: Run the tests
run: npm run jest:ci -- --coverage

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Node.js CI Tests

on: # yamllint disable-line rule:truthy
Expand All @@ -13,7 +12,7 @@ on: # yamllint disable-line rule:truthy
jobs:
build:
name: NodeJS Jest CI Test
runs-on: ubuntu-24.04
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-24.04", "macos-14", "windows-2022"]
Expand All @@ -33,8 +32,5 @@ jobs:
- name: Install dependencies
run: npm ci --verbose

- name: Lint
run: npm run lint

- name: Run the tests
run: npm run jest:ci
27 changes: 24 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "^8.5.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.1",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -36,13 +37,13 @@
"scripts": {
"build": "tsc -p tsconfig.prod.json",
"start": "npm run test",
"lint": "npx --yes eslint --env-info; npx --yes eslint . --color --max-warnings=0 && echo '✔ Your code looks good.'",
"jest:ci": "node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:clean": "npx --yes jest --clearCache && npx --yes watchman watch-del-all",
"jest:bruteforce": "BRUTEFORCE=true node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:watch": "node --experimental-vm-modules ./node_modules/.bin/jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug --watchAll",
"style:format": "npx --yes prettier --write 'src/**/*.ts'",
"style:check": "npx --yes prettier --check 'src/**/*.ts'",
"lint": "npx eslint --env-info; npx eslint . --color --max-warnings=0 && echo '✔ Your code looks good.'",
"jest:ci": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:clean": "npx jest --clearCache && npx watchman watch-del-all",
"jest:bruteforce": "cross-env BRUTEFORCE=true NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug",
"jest:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules npx jest --no-cache --ci --color --detectOpenHandles --forceExit --runInBand --debug --watchAll",
"style:format": "npx prettier --write 'src/**/*.ts'",
"style:check": "npx prettier --check 'src/**/*.ts'",
"test": "jest",
"update-all": "npm install $(npm outdated | cut -d' ' -f 1 | sed '1d' | xargs -I '$' echo '$@latest' | xargs echo)"
}
Expand Down

0 comments on commit 96607ba

Please sign in to comment.