Skip to content

Implement npm workspaces and GitHub actions #3

Implement npm workspaces and GitHub actions

Implement npm workspaces and GitHub actions #3

Workflow file for this run

name: Test Workflow
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14.0'
- name: Cache Dependencies
uses: actions/cache@v3
id: npm-cache # Use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm install
- name: Run Lint
run: npm run lint
- name: Build
run: npm run build
- name: Run Tests
run: npm run test