Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Add pr github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffsmale90 committed Dec 6, 2022
1 parent d27e382 commit 572f74e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Pull Requests

on: [pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
node: [14.0.0, 14.x, 16.x, 18.x]
os: [windows-2019, ubuntu-18.04, ubuntu-20.04, macos-11]
exclude:
# Node v18 does not run on ubuntu-18.04: https://github.com/nodejs/node/issues/42351#issuecomment-1068424442
- os: ubuntu-18.04
node: 18.x

runs-on: ${{ matrix.os }}

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Add msbuild to PATH
# we need msbuild tools for the `bcrypto` module
if: startsWith(matrix.os, 'windows-')
uses: microsoft/setup-msbuild@v1.1

- run: npm ci
- run: npm run test
env:
FORCE_COLOR: 1

0 comments on commit 572f74e

Please sign in to comment.