Skip to content

FIX: Thought Chain UI Improvements (#45) #37

FIX: Thought Chain UI Improvements (#45)

FIX: Thought Chain UI Improvements (#45) #37

name: Frontend Tests
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "frontend/**"
pull_request:
branches: ["main"]
paths:
- "frontend/**"
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
jobs:
frontend_tests:
if: "! github.event.pull_request.draft"
runs-on: ubuntu-latest
name: Frontend Tests
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: ./frontend
run: npm install
- name: Run tests with coverage
working-directory: ./frontend
run: CI=true npm run test -- --coverage .
- name: Git fetch unshallow
if: ${{ github.actor != 'dependabot[bot]' }}
run: git fetch --unshallow
- name: UI SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v3
if: ${{ github.actor != 'dependabot[bot]' }}
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: ./frontend
args: >
-Dproject.settings=./sonar-project.properties