From b71816d41693a64c6ba400e51586a27935e83915 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Wed, 21 Aug 2024 10:10:41 +0530 Subject: [PATCH] Use staging backend for cypress tests if PR base branch is staging (#8362) * Use staging backend for cypress tests if PR base branch is staging * switch to using environment files * correct default branch name --- .github/workflows/cypress.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/cypress.yaml b/.github/workflows/cypress.yaml index 5e671055535..f2f8fbd45cb 100644 --- a/.github/workflows/cypress.yaml +++ b/.github/workflows/cypress.yaml @@ -22,11 +22,21 @@ jobs: - name: Checkout 📥 uses: actions/checkout@v3 + - name: Set backend branch + id: backend-branch + run: | + if [[ '${{ github.event.pull_request.base.ref }}' == 'staging' ]]; then + echo "branch=staging" >> $GITHUB_OUTPUT + else + echo "branch=develop" >> $GITHUB_OUTPUT + fi + - name: Checkout care 📥 uses: actions/checkout@v3 with: repository: coronasafe/care path: care + ref: ${{ steps.backend-branch.outputs.branch }} - name: Start care docker containers 🐳 run: |