1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00
thatmattlove-hyperglass/.github/workflows/frontend.yml
Jason Hall 830f300822 Upgraded tooling and testing
Due to changes in tooling from the originals used file formats have changed.

pnpm	10.10.0
rye	0.44.0
ruff	0.11.8

CI is now testing on a matrix of pnpm, node, and python versions. This
will hopefully cover edgecases where users are running various version.
Still needs update to use python version in matrix with `rye`.

Installs OS deps in workflow

Adds 'packages' key in workspace form pnpm 9

Makes testing for BaseExternal configurable

Adds redis and httpbin as service containers

ruff lint changed dictionary comprehensions

adds environment variables for httpbin

Fixes runner to docker communications
2025-05-13 17:55:56 -04:00

58 lines
1.6 KiB
YAML

name: Frontend Testing
on:
push:
paths:
- hyperglass/ui/**
- .github/**
pull_request:
jobs:
frontend:
name: Frontend Tests
strategy:
fail-fast: false
matrix:
node-version: [20, 22]
pnpm-version: [9, 10]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
working-directory: ./hyperglass/ui
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Install PNPM
uses: pnpm/action-setup@v3
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
working-directory: ${{ env.working-directory }}
run: pnpm install
- name: Create empty hyperglass.json
working-directory: ${{ env.working-directory }}
run: echo '{}' > hyperglass.json
- name: Formatting
working-directory: ${{ env.working-directory }}
run: pnpm run format:check
- name: Lint
working-directory: ${{ env.working-directory }}
run: pnpm run lint
- name: Check Types
working-directory: ${{ env.working-directory }}
run: pnpm run typecheck
- name: Tests
working-directory: ${{ env.working-directory }}
run: pnpm run test