From f0d9ab32bb3331b3174ac3cd86fdd65d42f6182d Mon Sep 17 00:00:00 2001 From: Boaz Poolman Date: Mon, 30 Dec 2024 18:32:06 +0000 Subject: [PATCH] fix: upload video artifacts on runner failure --- .github/workflows/tests.yml | 2 +- cypress.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9170140..47c6f37 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,7 +65,7 @@ jobs: 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' + if: failure() with: name: cypress-videos path: cypress/videos diff --git a/cypress.config.js b/cypress.config.js index 120ad07..15fc2ae 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: process.env.ACTIONS_RUNNER_DEBUG, + video: true, defaultCommandTimeout: 20000, requestTimeout: 20000, setupNodeEvents(on, config) {