From 1afd9cbdc04e5074dd409ae134fa4fa5bf95f403 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Wed, 4 Oct 2023 14:29:41 -0400 Subject: [PATCH] Reuse Node.js workflow See https://github.com/nasa-gcn/gcn.nasa.gov/pull/1477 --- .github/workflows/node.js.yml | 19 +------------------ package.json | 3 +++ 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8a93753..a282c75 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -8,21 +8,4 @@ on: - main jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: ['16', '18'] - steps: - - uses: actions/checkout@v4 - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - name: NPM Install - run: npm ci - - name: Run eslint linter - run: npx eslint --max-warnings 0 . - - name: Run Prettier code style checks - run: npx prettier -c . - - name: Upload to Codecov.io - uses: codecov/codecov-action@v3 + uses: nasa-gcn/.github/.github/workflows/node.yml@main diff --git a/package.json b/package.json index 2f6d212..b75d804 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "prepare:esbuild": "esbuild index.ts --bundle --packages=external --outfile=index.js --platform=node --format=esm --tree-shaking=true", "prepare": "run-p prepare:*" }, + "engines": { + "node": ">=18" + }, "dependencies": { "@opensearch-project/opensearch": "^2.2.0", "env-paths": "^3.0.0",