Skip to content

chore: 🤖 fix build #103

chore: 🤖 fix build

chore: 🤖 fix build #103

Workflow file for this run

name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
install:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20.x]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Cache node_modules
uses: actions/cache@v3
id: cache-node_modules
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Install
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
build:
runs-on: ubuntu-latest
needs: install
strategy:
matrix:
node: [20.x]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Restore cache from node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run build --if-present
test:
runs-on: ubuntu-latest
needs: [install, build]
strategy:
matrix:
node: [20.x]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Restore cache from node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run test