From c46fcc9db82a74147e332b52ad17d88a339ab505 Mon Sep 17 00:00:00 2001 From: Boaz Poolman Date: Mon, 30 Dec 2024 17:55:08 +0000 Subject: [PATCH] chore: upload cypress video's as artifacts in debug mode of github actions --- .github/workflows/tests.yml | 6 ++++++ cypress.config.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec74ab0..9170140 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,6 +64,12 @@ jobs: name: cypress-screenshots path: cypress/screenshots if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn` + - uses: actions/upload-artifact@v4 + if: env.ACTIONS_RUNNER_DEBUG == 'true' + with: + name: cypress-videos + path: cypress/videos + if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn` - name: Upload coverage to Codecov uses: codecov/codecov-action@v2 with: diff --git a/cypress.config.js b/cypress.config.js index 06d91b6..120ad07 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -5,7 +5,7 @@ module.exports = defineConfig({ e2e: { baseUrl: 'http://localhost:1337', specPattern: '**/*.cy.{js,ts,jsx,tsx}', - video: false, + video: process.env.ACTIONS_RUNNER_DEBUG, defaultCommandTimeout: 20000, requestTimeout: 20000, setupNodeEvents(on, config) {