diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 01ed495..380d9a1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -288,6 +288,11 @@ jobs: secret_astronomer_host: ${{ secrets.ASTRONOMER_HOST }} secret_astro_api_token: ${{ secrets.ASTRO_API_TOKEN }} + - name: Mock git commands + run: | + mv e2e-setup/mocks/image-deploy-git.sh /usr/local/bin/git + chmod +x /usr/local/bin/git + - name: Install dependencies run: | @@ -313,7 +318,7 @@ jobs: with: deployment-id: ${{ matrix.deployment_id }} workspace: ${{ steps.get-astro-env-info.outputs.workspace_id }} - pytest: true + parse: true action: deploy root-folder: e2e-setup/astro-project diff --git a/e2e-setup/mocks/image-deploy-git.sh b/e2e-setup/mocks/image-deploy-git.sh new file mode 100644 index 0000000..792ca88 --- /dev/null +++ b/e2e-setup/mocks/image-deploy-git.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# hack to mock git commands as part of action.yaml so that we could simulate image deploy scenario without making any additional commits + +# Check if the script was invoked with "git diff" +if [[ "$1" == "diff" ]]; then + echo "e2e-setup/astro-project/Dockerfile" +elif [[ "$1" == "fetch" ]]; then + echo "Handling git fetch, doing nothing" +else + echo "Error: git mock script isn't configured to handle $1" >&2 + exit 1 +fi