Skip to content

Commit b948b10

Browse files
authored
fix: Fix the new e2e action to be portable (#3520)
See errors on getsentry/snuba#6746
1 parent 63334cb commit b948b10

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

action.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,17 @@ inputs:
1313
runs:
1414
using: "composite"
1515
steps:
16-
- name: Go into self-hosted directory
17-
shell: bash
18-
run: cd ${{ github.action_path }}
19-
2016
- name: Configure to use the test image
2117
if: inputs.project_name && inputs.image_url
2218
shell: bash
2319
run: |
2420
image_var=$(echo ${{ inputs.project_name }}_IMAGE | tr '[:lower:]' '[:upper:]')
25-
echo "${image_var}=${{ inputs.image_url }}" >> $GITHUB_ENV
21+
echo "${image_var}=${{ inputs.image_url }}" >> ${{ github.action_path }}/.env
2622
2723
- name: Setup dev environment
2824
shell: bash
2925
run: |
26+
cd ${{ github.action_path }}
3027
pip install -r requirements-dev.txt
3128
echo "PY_COLORS=1" >> "$GITHUB_ENV"
3229
### pytest-sentry configuration ###
@@ -64,7 +61,7 @@ runs:
6461
# Set permissions for docker volumes so we can cache and restore
6562
sudo chmod o+x /var/lib/docker
6663
sudo chmod -R o+rwx /var/lib/docker/volumes
67-
source .env
64+
source ${{ github.action_path }}/.env
6865
SENTRY_IMAGE_SHA=$(docker buildx imagetools inspect $SENTRY_IMAGE --format "{{println .Manifest.Digest}}")
6966
echo "SENTRY_IMAGE_SHA=$SENTRY_IMAGE_SHA" >> $GITHUB_OUTPUT
7067
SNUBA_IMAGE_SHA=$(docker buildx imagetools inspect $SNUBA_IMAGE --format "{{println .Manifest.Digest}}")
@@ -88,6 +85,7 @@ runs:
8885
SKIP_DB_MIGRATIONS: ${{ steps.restore_cache.outputs.cache-hit == 'true' && '1' || '' }}
8986
shell: bash
9087
run: |
88+
cd ${{ github.action_path }}
9189
# This is for the cache restore on Kafka to work in older releases
9290
docker run --rm -v "sentry-kafka:/data" busybox chown -R 1000:1000 /data
9391
# Add some customizations to test that path
@@ -132,18 +130,21 @@ runs:
132130
/var/lib/docker/volumes/sentry-clickhouse \
133131
/var/lib/docker/volumes/sentry-kafka \
134132
"$RUNNER_TEMP/volumes/"
133+
cd ${{ github.action_path }}
135134
docker compose up --wait
136135
TEST_CUSTOMIZATIONS=enabled pytest -x --cov --junitxml=junit.xml _integration-test/
137136
138137
- name: Upload coverage to Codecov
139138
uses: codecov/codecov-action@v5
140139
if: inputs.CODECOV_TOKEN
141140
with:
141+
directory: ${{ github.action_path }}
142142
token: ${{ inputs.CODECOV_TOKEN }}
143143
slug: getsentry/self-hosted
144144

145145
- name: Upload test results to Codecov
146146
if: inputs.CODECOV_TOKEN && !cancelled()
147147
uses: codecov/test-results-action@v1
148148
with:
149+
directory: ${{ github.action_path }}
149150
token: ${{ inputs.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)