Skip to content

Added caching to workflow. #6

Added caching to workflow.

Added caching to workflow. #6

Workflow file for this run

name: Run Unit Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout repository 🫠
- name: Setup Node
uses: actions/setup-node@v3
- uses: actions/cache@v3
id: npm-cache

Check failure on line 18 in .github/workflows/unit-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/unit-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 18
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- uses: actions/cache@v3
id: npm-cache
with:
path: ~/.npm
key: npm-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run build