From fec2b1c2142e32dab11a707abf3ad2f686ec5a48 Mon Sep 17 00:00:00 2001 From: bryopsida <8363252+bryopsida@users.noreply.github.com> Date: Sat, 22 Oct 2022 08:54:44 -0500 Subject: [PATCH] gh action pr test workflow --- .github/workflows/pr.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..2a8b9852 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,24 @@ +name: Test +on: + pull_request: + branches: [ "master" ] +jobs: + test: + name: Test + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node-version: [14.x,16.x,18.x] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + # can be used to compile TS -> JS prior to testing if needed + - run: npm run build --if-present + - run: npm test