Skip to content

Commit

Permalink
pass env directly in docker compose run
Browse files Browse the repository at this point in the history
mount file and pass env

remove extra env

temp
  • Loading branch information
amishas157 committed Aug 8, 2024
1 parent f08b276 commit c75499d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ jobs:
docker-compose up -d
- name: Create GCP Credentials File
# run: |
# echo "${{ secrets.CREDS_TEST_HUBBLE }}" > ${{ runner.workspace }}/gcp-key.json
run: |
echo "${{ secrets.CREDS_TEST_HUBBLE }}" > ${{ runner.workspace }}/gcp-key.json
printf "%s" "${{ secrets.CREDS_TEST_HUBBLE }}" > ${{ 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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c75499d

Please # to comment.