From 144b06c9e45a84a9c6f59336eb112000a6c53cdc Mon Sep 17 00:00:00 2001 From: Bregwin Jogi <91784318+brokoli777@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:40:35 -0500 Subject: [PATCH 1/2] Rename, simplify and update to add linting to CI --- .github/workflows/{node.js.yml => ci.yml} | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) rename .github/workflows/{node.js.yml => ci.yml} (52%) diff --git a/.github/workflows/node.js.yml b/.github/workflows/ci.yml similarity index 52% rename from .github/workflows/node.js.yml rename to .github/workflows/ci.yml index 4065312..93a054f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs name: Node.js CI @@ -10,21 +9,30 @@ on: branches: [ "main" ] jobs: - build: - + lint: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + - run: npm ci + - name: Run ESLint + run: npm run lint + test: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js LTS uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 'lts/*' cache: 'npm' - run: npm ci - - run: npm run build --if-present - - run: npm test + - name: Run tests + run: npm test From e5cf211ca3ebfbe34253ab07b04bb4cba2680a06 Mon Sep 17 00:00:00 2001 From: Bregwin Jogi Date: Fri, 15 Nov 2024 19:48:37 -0500 Subject: [PATCH 2/2] Remove linting from examples --- eslint.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 7de6b15..d0c7b11 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,6 @@ export default [ { languageOptions: { globals: globals.browser } }, pluginJs.configs.recommended, { - ignores: ["**/node_modules/", "examples/**, test/**"], languageOptions: { ecmaVersion: 'latest', globals: { @@ -16,4 +15,5 @@ export default [ }, }, }, + { ignores: ["examples/", "node_modules/", "coverage/", "test/"], }, ];