Skip to content

Commit

Permalink
Update test-changed-firestore-integration.yml (#7708)
Browse files Browse the repository at this point in the history
  • Loading branch information
milaGGL authored and prameshj committed Nov 13, 2023
1 parent 7534010 commit 50668ec
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/test-changed-firestore-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.JSSDK_ACTIONS_SA_KEY }}'

# create composite indexes with Terraform
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
Expand All @@ -29,8 +30,21 @@ jobs:
if: github.event_name == 'pull_request'
run: |
cd packages/firestore
terraform apply -var-file=../../config/project.json -auto-approve &> /dev/null
# Define a temporary file, redirect both stdout and stderr to it
output_file=$(mktemp)
if ! terraform apply -var-file=../../config/project.json -auto-approve > "$output_file" 2>&1 ; then
cat "$output_file"
if cat "$output_file" | grep -q "index already exists"; then
echo "==================================================================================="
echo -e "\e[93m\e[1mTerraform apply failed due to index already exists; We can safely ignore this error.\e[0m"
echo "==================================================================================="
fi
exit 1
fi
rm -f "$output_file"
continue-on-error: true

- name: Set up Node (16)
uses: actions/setup-node@v3
with:
Expand Down

0 comments on commit 50668ec

Please sign in to comment.