Some checks failed
Frontend / Unit Tests & Coverage (push) Has been skipped
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1m13s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 6s
Server / Tests (frappe ${{ matrix.frappe-branch }}) (push) Has been skipped
Server / Resolve frappe matrix (push) Failing after 1s
Frontend / Lint (push) Failing after 1s
Frontend / Production Build (push) Failing after 1s
Server / Coverage Wrap Up (push) Has been skipped
Frontend / Coverage Wrap Up (push) Has been skipped
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: Run Frontend Tests
|
|
description: Install frontend dependencies and run Vitest with coverage.
|
|
inputs:
|
|
node-version:
|
|
description: Node.js version to use
|
|
required: false
|
|
default: "24"
|
|
enable-coverage:
|
|
description: When true, run with coverage collection
|
|
required: false
|
|
default: "true"
|
|
working-directory:
|
|
description: Path to the frontend directory
|
|
required: false
|
|
default: "frontend"
|
|
outputs:
|
|
coverage-path:
|
|
description: Path to the generated lcov coverage file
|
|
value: ${{ steps.set-output.outputs.coverage-path }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install dependencies
|
|
shell: bash
|
|
working-directory: ${{ inputs.working-directory }}
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Run tests (with coverage)
|
|
if: inputs.enable-coverage == 'true'
|
|
shell: bash
|
|
working-directory: ${{ inputs.working-directory }}
|
|
run: yarn test:coverage
|
|
|
|
- name: Run tests (without coverage)
|
|
if: inputs.enable-coverage != 'true'
|
|
shell: bash
|
|
working-directory: ${{ inputs.working-directory }}
|
|
run: yarn test:run
|
|
|
|
- name: Set coverage output path
|
|
id: set-output
|
|
shell: bash
|
|
run: echo "coverage-path=${{ inputs.working-directory }}/coverage/lcov.info" >> "$GITHUB_OUTPUT"
|