From f253538ae709c3663d62e1adb571c592c5fdc4ab Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Thu, 8 Aug 2024 09:58:27 -0500 Subject: [PATCH] pass env directly in docker compose run mount file and pass env remove extra env temp cat temp --- .github/workflows/integration-tests.yml | 11 ++++++++--- docker-compose.yaml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 132fdb89..dc449f27 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -37,11 +37,16 @@ jobs: run: | echo "${{ secrets.CREDS_TEST_HUBBLE }}" > ${{ runner.workspace }}/gcp-key.json + - name: Verify file contents + run: | + cat ${{ runner.workspace }}/gcp-key.json + shell: bash + - name: Run tests run: | - docker-compose run integration-tests go test -v -run ^TestExportTransactions$ ./cmd -timeout 30m - env: - GOOGLE_APPLICATION_CREDENTIALS: ${{ runner.workspace }}/gcp-key.json + docker-compose run -v ${{ runner.workspace }}/gcp-key.json:/usr/credential.json:ro -e GOOGLE_APPLICATION_CREDENTIALS=/usr/credential.json integration-tests go test -v -run ^TestExportTransactions$ ./cmd -timeout 30m + # env: + # GOOGLE_APPLICATION_CREDENTIALS: ${{ runner.workspace }}/gcp-key.json # docker-compose run integration-tests go test ./cmd -v -timeout 30m - name: Stop and remove containers diff --git a/docker-compose.yaml b/docker-compose.yaml index a33fb537..e5a7cf02 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,4 +10,4 @@ services: # - ./testdata:/usr/src/etl/testdata # environment: # # - GOOGLE_APPLICATION_CREDENTIALS=/usr/credential.json - # - GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-key.json + # - GOOGLE_APPLICATION_CREDENTIALS=/home/runner/work/stellar-etl/gcp-key.json