Skip to content

Merge branch 'dev' of https://github.com/MaibornWolff/SecObserve into… #372

Merge branch 'dev' of https://github.com/MaibornWolff/SecObserve into…

Merge branch 'dev' of https://github.com/MaibornWolff/SecObserve into… #372

name: Check frontend
on: [push, pull_request]
permissions: read-all
jobs:
code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 24
- name: Install dependencies
working-directory: ./frontend
run: |
npm ci
- name: Prettier
working-directory: ./frontend
run: |
npx prettier -c src
- name: ESLint
working-directory: ./frontend
run: |
npx eslint src
end_to_end_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: End-to-end tests
working-directory: .
run: |
cd end_to_end_tests
npm install
cd ..
docker compose -f docker-compose-playwright.yml build
docker compose -f docker-compose-playwright.yml up --abort-on-container-exit --exit-code-from playwright
check_code_sonarqube_frontend:
if: github.repository == 'MaibornWolff/SecObserve' && (github.ref == 'refs/heads/dev' || github.event_name == 'pull_request')
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
-
name: Run SonarQube scan for frontend
uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_FRONTEND }}
with:
projectBaseDir: frontend