Skip to content

Test Workflow reusability #12

Test Workflow reusability

Test Workflow reusability #12

Workflow file for this run

name: 'Tests'
# This workflow is responsible for running the Haztrak react client tests.
on:
pull_request:
branches: [ 'main' ]
push:
workflow_call:
jobs:
run_client_tests:
name: 'Run unit tests'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20 ]
steps:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Setup Node'
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: 'Install Dependencies'
run: npm ci
- name: Test Node.js-${{ matrix.node-version }}
run: npm test
env:
VITE_HT_ENV: 'TEST'