Skip to content

Commit

Permalink
Merge pull request #1397 from NatLibFi/issue1394-ci-builds-fail
Browse files Browse the repository at this point in the history
Fix running git commands in CI tests under GitHub Actions
  • Loading branch information
osma authored Dec 15, 2022
2 parents 538b246 + ba237a1 commit b13b2c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@
putenv('SKOSMOS_SPARQL_ENDPOINT=http://localhost:13030/skosmos-test/sparql');
}

# Allow running git commands in the php-actions/phpunit container
# (prevent "dubious ownership" error; /app is owned by another user, not root)
if (getenv('GITHUB_ACTIONS') === 'true' ) {
mkdir('/home/runner');
exec('git config --global --add safe.directory /app');
}

require_once(__DIR__ . '/../vendor/autoload.php');
require_once(__DIR__ . '/../model/Model.php');

0 comments on commit b13b2c4

Please sign in to comment.