add composite action for reusable steps

test action

change name of node setup step

push fix for format/lint check
This commit is contained in:
jalensailin
2025-08-26 16:35:09 -04:00
parent 570fe9e7a5
commit d469452329
2 changed files with 30 additions and 12 deletions
+14
View File
@@ -0,0 +1,14 @@
name: "Setup Node Project"
description: "Sets up a Node.js project"
runs:
using: "composite"
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install dependencies
run: npm ci
shell: bash
+16 -12
View File
@@ -7,23 +7,27 @@ on:
jobs:
lint:
name: Lint and Format Check
name: Run ESLint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
run: npm ci
- uses: actions/checkout@v4
- name: Node Setup
uses: ./.github/actions/setup-node # Set the folder
- name: Run ESLint
run: npm run lint
format:
name: Run Prettier Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Node Setup
uses: ./.github/actions/setup-node # Set the folder
- name: Check Prettier formatting
run: npm run format:check
defaults:
run:
shell: bash