Skip to content

Expand unit tests for services #1165

Expand unit tests for services

Expand unit tests for services #1165

Workflow file for this run

name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
web:
name: Web Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: "./web/.nvmrc"
- name: Run npm install
run: npm ci
- name: Run linter
run: npm run lint
if: ${{ !cancelled() }}
- name: Run formatter
run: npm run format
if: ${{ !cancelled() }}
- name: Run svelte checks
run: npm run check:svelte
if: ${{ !cancelled() }}
- name: Run tsc
run: npm run check:typescript
if: ${{ !cancelled() }}
# - name: Run unit tests & coverage
# run: npm run test:cov
# if: ${{ !cancelled() }}
server:
name: Server Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- name: Run checkstyle
uses: dbelyaev/action-checkstyle@v1.16.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-check
workdir: ./server
checkstyle_config: ./server/checkstyle.xml
level: error
filter_mode: nofilter
- name: Run unit tests
run: ./mvnw -Dtest='!de.uftos.e2e.**,!UftosApplicationTests' test
e2e:
name: E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: "./web/.nvmrc"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- name: Docker build
run: docker compose -f docker-compose.e2e.yml build
if: ${{ !cancelled() }}
- name: Run npm install
working-directory: web
run: npm ci
- name: Install Playwright Browsers
working-directory: web
run: npx playwright install --with-deps chromium
if: ${{ !cancelled() }}
- name: Run Server e2e tests
working-directory: server
run: ./mvnw -Dtest='UftosApplicationTests' test
if: ${{ !cancelled() }}
- name: Run e2e tests (web)
working-directory: web
run: npx playwright test
if: ${{ !cancelled() }}