Skip to content

Defined pipelines (#35) #3

Defined pipelines (#35)

Defined pipelines (#35) #3

Workflow file for this run

# Reference: <https://help.github.com/en/actions/language-and-framework-guides/using-nodejs-with-github-actions>
name: Build
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-npm
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: steps.cache-npm.outputs.cache-hit != 'true'
name: List the state of node modules
run: npm list
continue-on-error: true
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm run test