Skip to content

add coverage to ui tests #14

add coverage to ui tests

add coverage to ui tests #14

Workflow file for this run

name: CI
on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on main and dev branch
- main
- ui-tests
# Sequence of patterns matched against refs/tags
tags: '*'
jobs:
build-and-test:
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: '21.6.0' # Match the version in your Dockerfile
- name: Install UI dependencies
working-directory: ./ui
run: |
npm ci
npm install --save-dev @vitest/coverage-v8
- name: Run tests with coverage
working-directory: ./ui
run: npm run test:coverage
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: ui/coverage/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Make run.sh executable
run: chmod +x ./run.sh
- name: Docker build training, backend, and frontend
run: ./run.sh