Skip to content

Add a action to build and run the frontend unit tests #1

Add a action to build and run the frontend unit tests

Add a action to build and run the frontend unit tests #1

name: Build and Test
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Set up Chrome for Karma tests
uses: browser-actions/setup-chrome@v1
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Run frontend tests
working-directory: external-control-frontend
run: npm run test
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: target/