From fabf643ce719e18fc725b81379138f542ff253b8 Mon Sep 17 00:00:00 2001 From: Joe Tsang <30622993+jtsang586@users.noreply.github.com> Date: Wed, 17 May 2023 16:21:10 +0100 Subject: [PATCH] chore(ci): fix nightly test runner (#3804) --- .github/workflows/cypress-run.yml | 4 ++-- .gitignore | 2 +- apps/explorer-e2e/cypress.config.js | 3 ++- apps/explorer-e2e/src/support/index.js | 1 + apps/governance-e2e/cypress.config.js | 3 ++- apps/governance-e2e/src/support/index.js | 1 + 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cypress-run.yml b/.github/workflows/cypress-run.yml index e8c07eaa9..abe346284 100644 --- a/.github/workflows/cypress-run.yml +++ b/.github/workflows/cypress-run.yml @@ -20,7 +20,7 @@ jobs: project: ${{ fromJSON(inputs.projects) }} name: ${{ matrix.project }} runs-on: self-hosted-runner - timeout-minutes: 40 + timeout-minutes: 60 steps: # Checks if skip cache was requested - name: Set skip-nx-cache flag @@ -98,4 +98,4 @@ jobs: if: ${{ failure() }} with: name: test-report-${{ matrix.project }} - path: frontend-monorepo/apps/trading-e2e/cypress/reports + path: frontend-monorepo/apps/${{ matrix.project }}/cypress/reports diff --git a/.gitignore b/.gitignore index 3f94bdbd8..e950d90cd 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,4 @@ cypress.env.json .next #cypress -/apps/trading-e2e/cypress/reports/ +/apps/**/cypress/reports/ diff --git a/apps/explorer-e2e/cypress.config.js b/apps/explorer-e2e/cypress.config.js index 1d936740e..2ce3326ce 100644 --- a/apps/explorer-e2e/cypress.config.js +++ b/apps/explorer-e2e/cypress.config.js @@ -1,10 +1,11 @@ const { defineConfig } = require('cypress'); module.exports = defineConfig({ - projectId: 'et4snf', + reporter: '../../node_modules/cypress-mochawesome-reporter', e2e: { setupNodeEvents(on, config) { + require('cypress-mochawesome-reporter/plugin')(on); require('@cypress/grep/src/plugin')(config); return config; }, diff --git a/apps/explorer-e2e/src/support/index.js b/apps/explorer-e2e/src/support/index.js index f465bb877..31ab90774 100644 --- a/apps/explorer-e2e/src/support/index.js +++ b/apps/explorer-e2e/src/support/index.js @@ -15,5 +15,6 @@ import '@vegaprotocol/cypress'; import './common.functions.js'; +import 'cypress-mochawesome-reporter/register'; import registerCypressGrep from '@cypress/grep'; registerCypressGrep(); diff --git a/apps/governance-e2e/cypress.config.js b/apps/governance-e2e/cypress.config.js index 38de2c722..41d23999f 100644 --- a/apps/governance-e2e/cypress.config.js +++ b/apps/governance-e2e/cypress.config.js @@ -1,10 +1,11 @@ const { defineConfig } = require('cypress'); module.exports = defineConfig({ - projectId: 'et4snf', + reporter: '../../node_modules/cypress-mochawesome-reporter', e2e: { setupNodeEvents(on, config) { + require('cypress-mochawesome-reporter/plugin')(on); require('@cypress/grep/src/plugin')(config); return config; }, diff --git a/apps/governance-e2e/src/support/index.js b/apps/governance-e2e/src/support/index.js index 029f2cd28..a94c6e065 100644 --- a/apps/governance-e2e/src/support/index.js +++ b/apps/governance-e2e/src/support/index.js @@ -8,6 +8,7 @@ import './wallet-eth.functions.ts'; import './wallet-teardown.functions.ts'; import './wallet-vega.functions.ts'; import './proposal.functions.ts'; +import 'cypress-mochawesome-reporter/register'; import registerCypressGrep from '@cypress/grep'; import { aliasGQLQuery } from '@vegaprotocol/cypress'; import { chainIdQuery, statisticsQuery } from '@vegaprotocol/mock';