Skip to content

Unit Tests and Build #15

Unit Tests and Build

Unit Tests and Build #15

Workflow file for this run

# ⁠Pipeline to run unit tests and build when PR is opened
name: Unit Tests and Build
run-name: Unit Tests and Build
on:
# We are only going to trigger this workflow using status check of a PR
# When a PR is opened, this workflow will be triggered and if the status check passes, the PR can be merged
pull_request:
types:
- opened
branches:
- main
workflow_dispatch:
jobs:
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "14"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
build:
name: Build Application
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "14"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build