Skip to content

Commit

Permalink
SK-1749: Fix secret import
Browse files Browse the repository at this point in the history
  • Loading branch information
saileshwar-skyflow committed Nov 26, 2024
1 parent f2e7ba4 commit 769ca43
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/shared-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,16 @@ jobs:
- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq

- name: Create valid_creds.json
- name: Process and Update Test Constants
run: |
SERVICE_ACCOUNT_CREDS="{{ secrets.VALID_SKYFLOW_CREDS_TEST }}"
if ! echo "$SERVICE_ACCOUNT_CREDS" | jq . >/dev/null 2>&1; then
echo "Invalid JSON in VALID_SKYFLOW_CREDS_TEST" >&2
exit 1
fi
echo "$SERVICE_ACCOUNT_CREDS" > ./tests/service_account/valid_credentials.json
STRING_FORMAT=$(echo $SERVICE_ACCOUNT_CREDS | jq -c .)
DICT_FORMAT=$(echo $SERVICE_ACCOUNT_CREDS | jq .)
echo "${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" > ./tests/service-account/valid_credentials.json
STRING_FORMAT=$(echo "${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" | jq -c .)
DICT_FORMAT=$(echo "${{ secrets.VALID_SKYFLOW_CREDS_TEST }}" | jq .)
sed -i "s|VALID_CREDENTIALS_STRING = .*|VALID_CREDENTIALS_STRING = '$STRING_FORMAT'|" ./tests/constants/test_constants.py
sed -i "s|VALID_SERVICE_ACCOUNT_CREDS = .*|VALID_SERVICE_ACCOUNT_CREDS = $DICT_FORMAT|" ./tests/constants/test_constants.py
shell: bash


- name: 'Run Tests'
Expand Down

0 comments on commit 769ca43

Please sign in to comment.