From 195e234f16121a1bf5c1e5bc79e8a3bf7fb6ea3a Mon Sep 17 00:00:00 2001 From: Joe Tsang <30622993+jtsang586@users.noreply.github.com> Date: Mon, 26 Sep 2022 13:56:53 +0100 Subject: [PATCH] Chore/separate cypress install in workflow (#1481) * chore: add step that makes sure that Cypress bins are installed correctly * chore: missing working directory * chore: update remaining flows Co-authored-by: Rado --- .../workflows/capsule-cypress-manual-trigger.yml | 13 ++++++++++++- .github/workflows/capsule-cypress-night-run.yml | 13 ++++++++++++- .github/workflows/capsule-cypress.yml | 13 ++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/capsule-cypress-manual-trigger.yml b/.github/workflows/capsule-cypress-manual-trigger.yml index c7bda1858..b0a857a62 100644 --- a/.github/workflows/capsule-cypress-manual-trigger.yml +++ b/.github/workflows/capsule-cypress-manual-trigger.yml @@ -24,7 +24,7 @@ on: jobs: manual: name: Run capsule tests -- manual trigger - runs-on: ubuntu-latest + runs-on: self-hosted env: GO111MODULE: 'on' VEGA_VERSION: 'v0.55.0' @@ -43,6 +43,12 @@ jobs: with: node-version: 16 + ####### + ## Install Yarn + ####### + - name: Setup yarn + run: npm install -g yarn + ####### ## Checkout repos ####### @@ -159,6 +165,11 @@ jobs: ## Run some tests ###### + # To make sure that all Cypress binaries are installed properly + - name: Install cypress bins + run: yarn cypress install + working-directory: frontend-monorepo + - name: Run smoke Cypress tests if: ${{ github.event.inputs.runAlltests == 'true' }} run: yarn nx run ${{ github.event.inputs.project }}:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --env.grepTags='@smoke' diff --git a/.github/workflows/capsule-cypress-night-run.yml b/.github/workflows/capsule-cypress-night-run.yml index f4883179a..422718453 100644 --- a/.github/workflows/capsule-cypress-night-run.yml +++ b/.github/workflows/capsule-cypress-night-run.yml @@ -9,7 +9,7 @@ on: jobs: nightly: name: Run capsule tests -- nightly - runs-on: ubuntu-latest + runs-on: self-hosted env: GO111MODULE: 'on' VEGA_VERSION: 'v0.55.0' @@ -28,6 +28,12 @@ jobs: with: node-version: 16 + ####### + ## Install Yarn + ####### + - name: Setup yarn + run: npm install -g yarn + ####### ## Checkout repos ####### @@ -122,6 +128,11 @@ jobs: ## Run some tests ###### + # To make sure that all Cypress binaries are installed properly + - name: Install cypress bins + run: yarn cypress install + working-directory: frontend-monorepo + - name: Run Cypress tests run: yarn nx run-many --target=e2e --all --record --key ${{ secrets.CYPRESS_RECORD_KEY }} working-directory: frontend-monorepo diff --git a/.github/workflows/capsule-cypress.yml b/.github/workflows/capsule-cypress.yml index 57f1748a4..1b100a8a5 100644 --- a/.github/workflows/capsule-cypress.yml +++ b/.github/workflows/capsule-cypress.yml @@ -15,7 +15,7 @@ on: jobs: pr: name: Run capsule tests - PR - runs-on: ubuntu-latest + runs-on: self-hosted env: GO111MODULE: 'on' VEGA_VERSION: 'v0.55.0' @@ -34,6 +34,12 @@ jobs: with: node-version: 16 + ####### + ## Install Yarn + ####### + - name: Setup yarn + run: npm install -g yarn + ####### ## Checkout repos ####### @@ -160,6 +166,11 @@ jobs: working-directory: frontend-monorepo main-branch-name: ${{github.base_ref}} + # To make sure that all Cypress binaries are installed properly + - name: Install cypress bins + run: yarn cypress install + working-directory: frontend-monorepo + - name: Run Cypress tests run: npx nx affected:e2e --record --key ${{ secrets.CYPRESS_RECORD_KEY }} --env.grepTags='@smoke' working-directory: frontend-monorepo