From 46a8a1d90d6b00a2ee53ffd898883c6425a91c26 Mon Sep 17 00:00:00 2001 From: Adish M Date: Wed, 24 May 2023 10:01:54 +0530 Subject: [PATCH] Fix for cypress workflow not picking up env from secrets --- .github/workflows/cypress.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 07ab30db25..b568a370f2 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -10,6 +10,11 @@ env: PR_NUMBER: ${{ github.event.number }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref }} + cancel-in-progress: true + jobs: Run-Cypress: if: ${{ github.event.action == 'labeled' && github.event.label.name == 'run-cypress' }} @@ -33,22 +38,14 @@ jobs: sleep 1 done - - name: create-json - id: create-json - uses: jsdaniell/create-json@v1.2.2 - with: - name: "cypress.env.json" - json: ${{ secrets.CYPRESS_SECRETS }} - - name: Cypress integration test uses: cypress-io/github-action@v5 with: working-directory: ./cypress-tests config: "baseUrl=https://tooljet-pr-${{ env.PR_NUMBER }}.onrender.com" config-file: cypress-run.config.js - # env: true - # env: - # CYPRESS_SECRETS: ${{ secrets.CYPRESS_SECRETS }} + env: + CYPRESS_SECRETS: ${{ secrets.CYPRESS_SECRETS }} - name: Capturing screenshots uses: actions/upload-artifact@v3