Skip to content

Commit 7e12d45

Browse files
jdatcmdOffgridwithJDclaude
authored
CI: derive the workspace path instead of hardcoding the repo name (#38)
The regression-test steps make the workspace traversable for the postgres user by chmod'ing each ancestor directory, and named the middle one literally: /home/runner/work/PL-php. Renaming the repository to plPHP moved the checkout to /home/runner/work/plPHP/plPHP, so that chmod now fails with "cannot access", and since the step runs under "bash -e" every matrix job and the ASAN job fail before a single test runs. Use $(dirname "$GITHUB_WORKSPACE") instead, which is the same directory whatever the repository is called. Co-authored-by: Joshua (D) Drake <136637981+ChronicallyJD@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 2e1432a commit 7e12d45

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
port=$(pg_lsclusters | awk '$1 == "${{ matrix.pg }}" && $2 == "main" { print $3 }')
9191
# let the postgres user reach and write the workspace
92-
sudo chmod a+x /home/runner /home/runner/work /home/runner/work/PL-php
92+
sudo chmod a+x /home/runner /home/runner/work "$(dirname "$GITHUB_WORKSPACE")"
9393
chmod -R a+rwX .
9494
sudo -u postgres env PGPORT=$port \
9595
make PG_CONFIG=/usr/lib/postgresql/${{ matrix.pg }}/bin/pg_config installcheck
@@ -178,7 +178,7 @@ jobs:
178178
- name: Run the regression tests under ASAN
179179
run: |
180180
port=$(pg_lsclusters | awk '$1 == 18 && $2 == "main" { print $3 }')
181-
sudo chmod a+x /home/runner /home/runner/work /home/runner/work/PL-php
181+
sudo chmod a+x /home/runner /home/runner/work "$(dirname "$GITHUB_WORKSPACE")"
182182
chmod -R a+rwX .
183183
# the cookbook test needs SimpleXML, unavailable with extensions off
184184
tests=$(grep '^REGRESS' Makefile | sed 's/REGRESS = //; s/ cookbook//')

0 commit comments

Comments
 (0)