[GithubActions] Try to move cypress videos to writeable location

This commit is contained in:
Aaro Koivukangas
2026-07-26 14:33:17 +03:00
parent 13fb1e11ba
commit 771cf5ef81
2 changed files with 10 additions and 3 deletions
+3 -2
View File
@@ -31,15 +31,16 @@ runs:
- name: Run Cypress inside docker container
shell: bash
# Permission errors? See: https://github.com/cypress-io/cypress-docker-images/blob/master/examples/included-as-non-root/README.md#run-as-non-root
run: |
docker run -v $PWD:/e2e -w /e2e --add-host host.docker.internal:host-gateway -e CYPRESS_VIDEO -e CYPRESS_baseUrl=http://host.docker.internal:1337 --entrypoint cypress cypress/included:15.18.1 run --browser firefox --spec ${{ inputs.spec }}
docker run --user node --rm -v $PWD:/e2e -w /e2e --add-host host.docker.internal:host-gateway -e CYPRESS_VIDEO -e CYPRESS_baseUrl=http://host.docker.internal:1337 --entrypoint cypress cypress/included:15.18.1 run --browser firefox --spec ${{ inputs.spec }}
- name: 'Upload video if tests fail'
uses: actions/upload-artifact@v7
if: failure()
with:
name: 'Cypress videos - ${{ inputs.test_name }}'
path: ./cypress/videos/*
path: /tmp/cypress/videos/*
retention-days: 7
- name: 'Print logs on failure'
+7 -1
View File
@@ -4,6 +4,13 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
projectId: 'c3jsph',
// Fixes Github <-> Cypress permission errors in CI
downloadsFolder: '/tmp/cypress/downloads',
screenshotsFolder: '/tmp/cypress/screenshots',
videosFolder: '/tmp/cypress/videos',
video: true,
defaultCommandTimeout: 30000,
requestTimeout: 30000,
videoCompression: false,
@@ -19,5 +26,4 @@ module.exports = defineConfig({
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
video: true,
})