Skip to content

Commit

Permalink
Fixed npm install and build workflow. Added caching of node_modules (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
suvodeep-pyne authored May 16, 2024
1 parent 8a2e539 commit 8992129
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
name: npm build
name: npm install and build

on:
push:
branches:
- main
- spyne/ci
pull_request:
branches:
- main

jobs:
build:
npm-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: '20.x'

- name: Install dependencies
run: npm install
working-directory: ./task-launcher

- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ./task-launcher/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/task-launcher/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build the project
run: npm run build
working-directory: ./task-launcher

0 comments on commit 8992129

Please sign in to comment.