Skip to content

Commit 21ef2fb

Browse files
Samuli RasiSamuli Rasi
Samuli Rasi
authored and
Samuli Rasi
committed
Add video configuration
Add a video configuration file that enables video and disables video compression. Turning off video compression should reduce CPU usage in the CI.
1 parent f8a8232 commit 21ef2fb

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.github/workflows/run-cypress-tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ jobs:
5757
uses: HSLdevcom/jore4-tools/github-actions/run-cypress-tests@run-cypress-tests-v1
5858
with:
5959
test-tags: ''
60+
video: 'false'
6061
threads: '3'

cypress/cypress.config.video.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'cypress';
2+
import config from './cypress.config';
3+
4+
// eslint-disable-next-line import/no-default-export
5+
export default defineConfig({
6+
e2e: {
7+
...config.e2e,
8+
video: true,
9+
// Bigger video files but faster runs because compression is skipped
10+
videoCompression: false,
11+
},
12+
});

cypress/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"ts:check": "yarn tsc --noEmit",
99
"ts:build": "yarn tsc --build",
1010
"qa": "yarn --frozen-lockfile && yarn ts:check && yarn prettier:check",
11-
"cy:run": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome"
11+
"cy:run": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome",
12+
"cy:run:video": "CYPRESS_BASE_URL=${CYPRESS_BASE_URL:-http://localhost:3300} cypress run --browser chrome --config-file ./cypress.config.video.ts"
1213
},
1314
"dependencies": {
1415
"@4tw/cypress-drag-drop": "^2.2.3",

0 commit comments

Comments
 (0)