Skip to content

Commit

Permalink
the pipeline only uses the latest node.js version now
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory567 committed Aug 15, 2024
1 parent 76e6f2e commit 9494d56
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow installs Node.js dependencies, caches them, builds the source code, runs tests, and builds/pushes a Docker image.
# This workflow installs Node.js dependencies, caches them, builds the source code, runs tests, performs a Snyk security check, and builds/pushes a Docker image.

name: Node.js CI

Expand All @@ -14,21 +14,16 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# Supported Node.js versions

steps:
# Step 1: Checkout the code
- name: Checkout Code
uses: actions/checkout@v4

# Step 2: Set up Node.js environment
- name: Set up Node.js ${{ matrix.node-version }}
# Step 2: Set up Node.js environment (latest version)
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: "22.x"
cache: npm

# Step 3: Install dependencies
Expand All @@ -47,21 +42,16 @@ jobs:
needs: build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# Supported Node.js versions

steps:
# Step 1: Checkout the code
- name: Checkout Code
uses: actions/checkout@v4

# Step 2: Set up Node.js environment
- name: Set up Node.js ${{ matrix.node-version }}
# Step 2: Set up Node.js environment (latest version)
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: "22.x"
cache: npm

# Step 3: Install Snyk
Expand Down

0 comments on commit 9494d56

Please sign in to comment.