Skip to content

Commit 7541789

Browse files
authored
Update php.yml
1 parent 4c72c0a commit 7541789

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/php.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ jobs:
6969
image: ghcr.io/${{ github.repository }}:main-${{ matrix.nextcloud_version }}
7070
env:
7171
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
72+
NEXTCLOUD_PATH: /usr/src/nextcloud/
73+
NEXTCLOUD_UPDATE: 1
7274
XDEBUG_MODE: coverage
7375
volumes:
7476
- /usr/bin/composer:/usr/bin/composer
7577
defaults:
7678
run:
7779
shell: bash
78-
working-directory: /usr/src/nextcloud/apps/
80+
working-directory: /usr/src/nextcloud/apps/solid
7981
name: PHP Unit Tests
8082
needs:
8183
- lint-php-syntax
@@ -91,25 +93,19 @@ jobs:
9193
steps:
9294
- uses: actions/checkout@v5
9395
# @CHECKME: cp site.conf /etc/apache2/sites-enabled/000-default.conf (?)
94-
- env:
95-
NEXTCLOUD_UPDATE: 1
96-
name: Setup Test Environment
96+
- name: Setup Test Environment
9797
run: |
98-
git config --global --add safe.directory /usr/src/nextcloud/apps
98+
git config --global --add safe.directory "${NEXTCLOUD_PATH}/apps"
9999
/entrypoint.sh "echo"
100100
bash "${GITHUB_WORKSPACE}/init.sh"
101-
rm -r /usr/src/nextcloud/apps/solid/
102-
cp --archive --verbose "${GITHUB_WORKSPACE}/." /usr/src/nextcloud/apps/
103-
working-directory: /usr/src/nextcloud/
101+
rm -r "${NEXTCLOUD_PATH}/apps/solid/"
102+
cp --archive --verbose "${GITHUB_WORKSPACE}/." "${NEXTCLOUD_PATH}/apps/"
104103
- name: Install and Cache Composer dependencies
105104
uses: ramsey/composer-install@v3
106-
with:
107-
working-directory: /usr/src/nextcloud/apps/solid
108105
env:
109106
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
110107
- name: Run PHPUnit
111108
run: bin/phpunit --configuration phpunit.xml
112-
working-directory: /usr/src/nextcloud/apps/solid/
113109

114110
# 03.quality.php.scan.dependencies-vulnerabilities.yml
115111
scan-dependencies-vulnerabilities:

0 commit comments

Comments
 (0)