Skip to content

Update build task

Update build task #1

Workflow file for this run

name: ci
on:
push:
branches:
- master
tags:
- v*
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT
- name: Use Node.js
uses: actions/setup-node@v3.7.0
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test