Skip to content

Update build

Update build #109

Workflow file for this run

name: Build pull request
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# Run only on non-merged non-draft mergeable pull requests
if: |
!(
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
&& !github.event.pull_request.draft
&& !github.event.pull_request.merged
&& github.event.pull_request.merge_commit_sha != null
)
steps:
- name: Check out merge commit of pull request
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and test
run: |
npm install
npm test