mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[GithubActions] Try to move cypress videos to writeable location
This commit is contained in:
@@ -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
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user