2023-10-10 08:46:37 +02:00
|
|
|
|
2023-10-10 12:08:00 +02:00
|
|
|
name: Node
|
2023-10-10 08:46:37 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
2023-11-03 15:31:43 +01:00
|
|
|
paths:
|
|
|
|
- "**.js" # Any JS file
|
|
|
|
- "package.json"
|
|
|
|
- "package-lock.json"
|
|
|
|
- ".github/workflows/node.yml" # This action
|
2023-10-10 08:46:37 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ "master" ]
|
2023-11-03 15:31:43 +01:00
|
|
|
paths:
|
|
|
|
- "**.js" # Any JS file
|
|
|
|
- "package.json"
|
|
|
|
- "package-lock.json"
|
|
|
|
- ".github/workflows/node.yml" # This action
|
2023-10-10 08:46:37 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.17, 16.x, 18.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-10-10 12:08:00 +02:00
|
|
|
- name: Use Node ${{ matrix.node-version }}
|
2023-10-10 08:46:37 +02:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
cache: 'npm'
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build --if-present
|