Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
ci: enable cypress video uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Jan 9, 2024
1 parent 7b6efc8 commit 5d4a4a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ jobs:
if: failure()
with:
name: cypress-screenshots
path: example/cypress/e2e/screenshots
path: example/cypress/screenshots
retention-days: 7

- name: Upload videos
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: example/cypress/e2e/videos
path: example/cypress/videos
retention-days: 7

- name: Upload coverage
Expand Down
4 changes: 4 additions & 0 deletions example/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import * as fs from 'node:fs';
import { defineConfig } from 'cypress';

const captureVideo = !!process.env.CI;

export default defineConfig({
viewportWidth: 1280,
viewportHeight: 720,
e2e: {
specPattern: 'cypress/e2e/**/*.cy.ts',
baseUrl: 'http://localhost:4173',
video: captureVideo,
videoCompression: captureVideo,
setupNodeEvents: (on): void => {
on(
'after:spec',
Expand Down

0 comments on commit 5d4a4a0

Please sign in to comment.