Skip to content

Commit c46fcc9

Browse files
committed
chore: upload cypress video's as artifacts in debug mode of github actions
1 parent e22906a commit c46fcc9

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ jobs:
6464
name: cypress-screenshots
6565
path: cypress/screenshots
6666
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
67+
- uses: actions/upload-artifact@v4
68+
if: env.ACTIONS_RUNNER_DEBUG == 'true'
69+
with:
70+
name: cypress-videos
71+
path: cypress/videos
72+
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
6773
- name: Upload coverage to Codecov
6874
uses: codecov/codecov-action@v2
6975
with:

cypress.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = defineConfig({
55
e2e: {
66
baseUrl: 'http://localhost:1337',
77
specPattern: '**/*.cy.{js,ts,jsx,tsx}',
8-
video: false,
8+
video: process.env.ACTIONS_RUNNER_DEBUG,
99
defaultCommandTimeout: 20000,
1010
requestTimeout: 20000,
1111
setupNodeEvents(on, config) {

0 commit comments

Comments
 (0)