Skip to content

Commit

Permalink
Create symlink on GitHub Actions runner in /srv/www that points to th…
Browse files Browse the repository at this point in the history
…e repository checkout

There are some hardcoded paths in the config that are hard to change and are needed for rendering the blog post template:
- SRI extension path to CSS, JS etc.
- SVG icons paths

These could be set/overwritten in the test with

```php
$this->sriConfig->setLocalPrefix((object)['path' => __DIR__ . '/../../../public/www.michalspacek.cz']);
PrivateProperty::setValue($this->svgIconNodeFactory, 'iconsDir', __DIR__ . '/../../../node_modules/humbleicons/icons');
```
But then you get "Cannot modify readonly property Spaze\SvgIcons\Nodes\IconNodeFactory::$iconsDir"

Creating a custom template where neither SRI nor SVG icons are needed would be possible but then things like "Component with name 'articleHeaderIcons' does not exist" from #169 would not be tested.
  • Loading branch information
spaze committed Aug 17, 2023
1 parent 4852e34 commit 63a5f1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ jobs:
with:
coverage: pcov
php-version: ${{ matrix.php-version }}
- name: Create symlink in /srv/www
run: |
sudo mkdir --parents /srv/www
sudo ln --symbolic $GITHUB_WORKSPACE /srv/www
- run: make --directory=site tester
- name: Failed test output, if any
if: failure()
Expand Down

0 comments on commit 63a5f1c

Please sign in to comment.