Files
grafana/.github/workflows/frontend-unit-tests.yml
Kevin Minehart 2ec8b0b45b CI: Create the frontend test workflow in GHA (#101256)
* Create the frontend test workflow

* Give .github/workflows/test-frontend to frontend platform group

* Remove file filter

* rename workflow

* frontend unit tests

* add yarn install

* update CODEOWNERS

* Run on 8 core machines?

* use parallelization?

* add sharding

* update package.json to allow sharding jest

* update workflow name

* yarn generate-apis

* update naming
2025-02-27 09:00:00 -06:00

30 lines
671 B
YAML

name: Frontend tests
on:
pull_request:
push:
branches:
- main
- release-*.*.*
jobs:
test-frontend:
runs-on: ubuntu-latest-8-cores
name: "Unit tests (${{ matrix.chunk }} / 8)"
strategy:
fail-fast: true
matrix:
chunk: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- run: yarn install --immutable --check-cache
- run: yarn run test:ci
env:
TEST_MAX_WORKERS: 2
TEST_SHARD: ${{ matrix.chunk }}
TEST_SHARD_TOTAL: 8