Skip to content

Commit 16ade23

Browse files
allanhaggettclaude
andcommitted
Fix PHPStan CI: checkout plugin directly into Moodle tree
The scanDirectories relative paths (../../lib, ../../course) need the plugin to physically live at local/githubsync within the Moodle tree. Previous approach used symlinks which broke real-path resolution. Now: checkout Moodle as root, then checkout plugin into local/githubsync. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3e5776d commit 16ade23

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.github/workflows/phpstan.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,26 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Checkout plugin
16-
uses: actions/checkout@v4
17-
with:
18-
path: local/githubsync
19-
2015
- name: Checkout Moodle
2116
uses: actions/checkout@v4
2217
with:
2318
repository: moodle/moodle
2419
ref: MOODLE_405_STABLE
25-
path: moodle
20+
21+
- name: Checkout plugin into Moodle
22+
uses: actions/checkout@v4
23+
with:
24+
path: local/githubsync
2625

2726
- name: Setup PHP
2827
uses: shivammathur/setup-php@v2
2928
with:
3029
php-version: '8.2'
3130
tools: composer:v2
3231

33-
- name: Link plugin into Moodle
34-
run: |
35-
ln -s $GITHUB_WORKSPACE/local/githubsync $GITHUB_WORKSPACE/moodle/local/githubsync
36-
3732
- name: Create Moodle config
3833
run: |
39-
cat > $GITHUB_WORKSPACE/moodle/config.php << 'MOODLECFG'
34+
cat > config.php << 'MOODLECFG'
4035
<?php
4136
$CFG = new stdClass();
4237
$CFG->dirroot = __DIR__;

0 commit comments

Comments
 (0)