Skip to content

Commit

Permalink
Fix for cypress develop and main workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-aravind committed Nov 11, 2024
1 parent fd3b4cf commit a4af982
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/run-cypress-tests-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ jobs:
secrets:
DOCKER_PAT: ${{ secrets.DOCKER_PAT }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
2 changes: 2 additions & 0 deletions .github/workflows/run-cypress-tests-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ jobs:
secrets:
DOCKER_PAT: ${{ secrets.DOCKER_PAT }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
12 changes: 8 additions & 4 deletions .github/workflows/run-cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ on:
required: true
CYPRESS_PASSWORD:
required: true
S3_ACCESS_KEY_ID:
required: true
S3_SECRET_ACCESS_KEY:
required: true


jobs:
Expand Down Expand Up @@ -88,9 +92,9 @@ jobs:
- name: Pull and Run CMS Backend Docker Image
run: |
if [ "${{ github.event.inputs.environment }}" == "production" ]; then
if [ "${{ inputs.environment }}" == "production" ]; then
IMAGE="ghcr.io/culturecreates/footlight-calendar-api/footlight-admin-api:master"
elif [ "${{ github.event.inputs.environment }}" == "staging" ]; then
elif [ "${{ inputs.environment }}" == "staging" ]; then
IMAGE="ghcr.io/culturecreates/footlight-calendar-api/footlight-admin-api:develop"
fi
Expand Down Expand Up @@ -132,7 +136,7 @@ jobs:
base_url="http://test.footlight.app:3000/"
grep_value="${{ github.event.inputs.grep }}"
grep_value="${{ inputs.grep }}"
echo "Original grep_value: '$grep_value'"
grep_value_clean=$(echo "$grep_value" | tr -d '\n\r')
echo "Cleaned grep_value: '$grep_value_clean'"
Expand All @@ -146,7 +150,7 @@ jobs:
echo "JSON grep_value: '$grep_value_json'"
# Properly format the --env argument for Cypress
env_json="{\"grepTags\":\"${{ github.event.inputs.grepTags }}\",\"grep\":${grep_value_json}}"
env_json="{\"grepTags\":\"${{ inputs.grepTags }}\",\"grep\":${grep_value_json}}"
echo "Formatted env JSON: $env_json"
# Simulate the Cypress --env argument
Expand Down

0 comments on commit a4af982

Please sign in to comment.