From 91d568624beca60a368beb332d3c63000716de39 Mon Sep 17 00:00:00 2001 From: Phil Norton Date: Sun, 16 Mar 2025 09:14:37 +0000 Subject: [PATCH] 15: Added unit testing to PR process. --- .github/workflows/prtest.yml | 27 +++++++++++++++++++++++++++ .nvmrc | 1 + 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/prtest.yml create mode 100644 .nvmrc diff --git a/.github/workflows/prtest.yml b/.github/workflows/prtest.yml new file mode 100644 index 0000000..daa8156 --- /dev/null +++ b/.github/workflows/prtest.yml @@ -0,0 +1,27 @@ +name: Four PR Test Workflow + +on: + pull_request: + branches: + - main + - master + - stage + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Check out repository code. + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + cache: npm + node-version-file: '.nvmrc' + + - name: Install dependencies + run: npm ci + + - name: Run unit tests + run: npm run test diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..726a201 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.11.1 \ No newline at end of file