From c24491d0c6d8b0ead48c42aafc1aa3bdce78b930 Mon Sep 17 00:00:00 2001 From: Floyd Haremsa Date: Fri, 17 Nov 2023 10:18:10 +0100 Subject: [PATCH] ci: upload all cy artifacts --- .github/workflows/tests.yml | 20 +++++++++++++------- client-v2/cypress.config.ts | 8 ++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 07df0a0b..82d1e50e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,6 @@ jobs: cache: 'npm' cache-dependency-path: client-v2/package-lock.json - - run: cd client-v2 - run: npm ci working-directory: ./client-v2 @@ -35,6 +34,14 @@ jobs: - run: npm run comp:ci working-directory: ./client-v2 + - name: Upload component test artifacts + uses: actions/upload-artifact@v3 + if: always() + with: + name: component test artifacts + path: client-v2/.cypress/component + retention-days: 7 + # - name: Upload coverage artifacts # uses: actions/upload-artifact@v3 # with: @@ -60,11 +67,10 @@ jobs: cache: 'npm' cache-dependency-path: server/package-lock.json - - run: cd server - run: npm ci working-directory: ./server - - run: npm run build --if-present + - run: npm run build working-directory: ./server - run: npm run lint @@ -73,7 +79,7 @@ jobs: - run: npm run typecheck-snapshot-scripts working-directory: ./server - - name: Setup Postgres + - name: Setup Postgres uses: Daniel-Marynicz/postgresql-action@master with: postgres_image_tag: 12-alpine @@ -131,10 +137,10 @@ jobs: - run: npm run e2e:ci working-directory: ./client-v2 - - name: Upload e2e test videos + - name: Upload e2e test artifacts uses: actions/upload-artifact@v3 if: always() with: - name: e2e test videos - path: client-v2/cypress/videos + name: e2e test artifacts + path: client-v2/.cypress/e2e retention-days: 7 diff --git a/client-v2/cypress.config.ts b/client-v2/cypress.config.ts index df8af710..5c0fb301 100644 --- a/client-v2/cypress.config.ts +++ b/client-v2/cypress.config.ts @@ -4,7 +4,11 @@ export default defineConfig({ e2e: { baseUrl: 'http://localhost:4200', supportFile: './cypress/support/e2e.ts', + video: true, + videosFolder: './.cypress/e2e/videos', + screenshotsFolder: './.cypress/e2e/screenshots', + downloadsFolder: './.cypress/e2e/downloads', }, component: { @@ -13,6 +17,10 @@ export default defineConfig({ bundler: 'webpack', }, specPattern: '**/*.test.ts', + video: true, + videosFolder: './.cypress/component/videos', + screenshotsFolder: './.cypress/component/screenshots', + downloadsFolder: './.cypress/component/downloads', }, })