diff --git a/.github/workflows/live.yaml b/.github/workflows/live.yaml index b769dc8..d3bd468 100644 --- a/.github/workflows/live.yaml +++ b/.github/workflows/live.yaml @@ -41,7 +41,7 @@ jobs: # need add host.docker.internal:host-gateway, # for Connect to emulator if using it run: | - docker run --rm --name ${{github.event.repository.owner.login}} --add-host=host.docker.internal:host-gateway -e GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT -e GOOGLE_CLOUD_STORAGE_BUCKET -e SERVER_URI -e GOOGLE_OAUTH2_REFRESH_TOKEN_TEST -e APP_ENV -e PORT -e GOOGLE_OAUTH2_CLIENT_ID_TEST -e GOOGLE_OAUTH2_CLIENT_SECRET_TEST ${{github.event.repository.name}} go test -v --cover -ldflags '-w -s' ./... + docker run --rm --name ${{github.event.repository.owner.login}} -e GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT -e GOOGLE_CLOUD_STORAGE_BUCKET -e SERVER_URI -e GOOGLE_OAUTH2_REFRESH_TOKEN_TEST -e APP_ENV -e PORT -e GOOGLE_OAUTH2_CLIENT_ID_TEST -e GOOGLE_OAUTH2_CLIENT_SECRET_TEST ${{github.event.repository.name}} go test -v --cover -ldflags '-w -s' ./... deploy: needs: [ test ] diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index f3777b7..a639b84 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -42,7 +42,7 @@ jobs: - name: Unit testing run: | - docker run --rm --name ${{github.event.repository.owner.login}} --add-host=host.docker.internal:host-gateway -e GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT -e GOOGLE_CLOUD_STORAGE_BUCKET -e SERVER_URI -e GOOGLE_CLOUD_STORAGE_EMULATOR_ENDPOINT -e GOOGLE_OAUTH2_REFRESH_TOKEN_TEST -e PORT -e GOOGLE_OAUTH2_CLIENT_ID_TEST -e GOOGLE_OAUTH2_CLIENT_SECRET_TEST ${{github.event.repository.name}} go test -v --cover -ldflags '-w -s' ./... + docker run --rm --name ${{github.event.repository.owner.login}} --network tempsy_net -e GOOGLE_CLOUD_STORAGE_SERVICE_ACCOUNT -e GOOGLE_CLOUD_STORAGE_BUCKET -e SERVER_URI -e GOOGLE_CLOUD_STORAGE_EMULATOR_ENDPOINT -e GOOGLE_OAUTH2_REFRESH_TOKEN_TEST -e PORT -e GOOGLE_OAUTH2_CLIENT_ID_TEST -e GOOGLE_OAUTH2_CLIENT_SECRET_TEST ${{github.event.repository.name}} go test -v --cover -ldflags '-w -s' ./... - name: Clean up Services if: always() diff --git a/deployments/compose.yaml b/deployments/compose.yaml index 19b7b91..28b4fee 100644 --- a/deployments/compose.yaml +++ b/deployments/compose.yaml @@ -1,6 +1,9 @@ services: firebase_emulators: + container_name: firebase_emulators image: afifurrohman/tiny-firebase + networks: + - tempsy_net ports: - 4000:4000 - 9999:9999 @@ -10,9 +13,10 @@ services: - tempsy_data:/root/.cache/firebase - ../configs/firebase.json:/firebase/firebase.json - ../configs/storage.rules:/firebase/storage.rules - # Needed for access public file when using emulator - extra_hosts: - - host.docker.internal:host-gateway volumes: - tempsy_data: \ No newline at end of file + tempsy_data: + +networks: + tempsy_net: + name: tempsy_net \ No newline at end of file