File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Frontend Tests
2+
3+ on :
4+ push :
5+ paths :
6+ - " frontend/**"
7+ pull_request :
8+ paths :
9+ - " frontend/**"
10+
11+ jobs :
12+ frontend-tests :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Check for Frontend Changes
20+ id : filter
21+ uses : dorny/paths-filter@v3
22+ with :
23+ filters : |
24+ frontend:
25+ - "frontend/**"
26+
27+ - name : Setup Node
28+ if : steps.filter.outputs.frontend == 'true'
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : 24
32+ cache : npm
33+ cache-dependency-path : frontend/package-lock.json
34+
35+ - name : Install Frontend Dependencies
36+ if : steps.filter.outputs.frontend == 'true'
37+ working-directory : ./frontend
38+ run : npm ci
39+
40+ - name : Install Playwright Chromium
41+ if : steps.filter.outputs.frontend == 'true'
42+ working-directory : ./frontend
43+ run : npx playwright install --with-deps chromium
44+
45+ - name : Run Frontend Tests
46+ if : steps.filter.outputs.frontend == 'true'
47+ working-directory : ./frontend
48+ run : npm test
Original file line number Diff line number Diff line change 11[ ![ Linting] ( https://github.com/Darosss/StreamManager/actions/workflows/linting.yaml/badge.svg )] ( https://github.com/Darosss/StreamManager/actions/workflows/linting.yaml )
2-
32[ ![ Backend Tests] ( https://github.com/Darosss/StreamManager/actions/workflows/backend-tests.yaml/badge.svg )] ( https://github.com/Darosss/StreamManager/actions/workflows/backend-tests.yaml )
3+ [ ![ Frontend Tests] ( https://github.com/Darosss/StreamManager/actions/workflows/frontend-tests.yaml/badge.svg )] ( https://github.com/Darosss/StreamManager/actions/workflows/frontend-tests.yaml )
44
55# Stream Manager
66
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import svgrPlugin from "vite-plugin-svgr";
55import eslint from "@nabla/vite-plugin-eslint" ;
66import path from "path" ;
77import { visualizer } from "rollup-plugin-visualizer" ;
8- import { playwright } from "@vitest/browser-playwright" ;
98
109export default defineConfig ( {
1110 css : {
@@ -26,13 +25,6 @@ export default defineConfig({
2625 eslint ( ) ,
2726 visualizer ( { filename : "dist/stats.html" , template : "treemap" } ) ,
2827 ] ,
29- test : {
30- browser : {
31- enabled : true ,
32- provider : playwright ( ) ,
33- instances : [ { browser : "chromium" } ] ,
34- environment : "jsdom" ,
35- } ,
36- } ,
28+
3729 envDir : "../" ,
3830} ) ;
Original file line number Diff line number Diff line change 1+ import { playwright } from "@vitest/browser-playwright" ;
2+ import { defineConfig } from "vitest/config" ;
3+
4+ export default defineConfig ( {
5+ test : {
6+ browser : {
7+ enabled : true ,
8+ provider : playwright ( ) ,
9+ instances : [ { browser : "chromium" } ] ,
10+ } ,
11+ } ,
12+ } ) ;
You can’t perform that action at this time.
0 commit comments