Skip to content

feat: implement library features #4

feat: implement library features

feat: implement library features #4

Workflow file for this run

name: Build & Test
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Restore node_modules cache
uses: actions/cache/restore@v3
id: cache
with:
path: node_modules
key: timestamp${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Cache node modules
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: node_modules
key: timestamp${{ hashFiles('package-lock.json') }}
build:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Unpack node_modules
uses: actions/cache/restore@v3
id: cache
with:
path: node_modules
key: timestamp${{ hashFiles('package-lock.json') }}
- name: Build
run: npm run build
test:
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Unpack node_modules
uses: actions/cache/restore@v3
id: cache
with:
path: node_modules
key: timestamp${{ hashFiles('package-lock.json') }}
- name: Unit Test
run: npm run test