Skip to content

Commit 4c72c0a

Browse files
authored
Update PHP workflow to use solid directory
1 parent f4f3fe3 commit 4c72c0a

File tree

1 file changed

+13
-29
lines changed

1 file changed

+13
-29
lines changed

.github/workflows/php.yml

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
- '.config/phpcs.xml.dist'
1111
- '.config/phpunit.xml.dist'
1212
- '.github/workflows/php.yml'
13-
- 'composer.json'
14-
- 'composer.lock'
13+
- 'solid/composer.json'
14+
- 'solid/composer.lock'
1515
branches: [ main ]
1616
types: [ opened, reopened, synchronize ]
1717
# This event occurs when there is a push to the repository.
@@ -21,8 +21,8 @@ on:
2121
- '.config/phpcs.xml.dist'
2222
- '.config/phpunit.xml.dist'
2323
- '.github/workflows/php.yml'
24-
- 'composer.json'
25-
- 'composer.lock'
24+
- 'solid/composer.json'
25+
- 'solid/composer.lock'
2626
# Allow manually triggering the workflow.
2727
workflow_dispatch:
2828

@@ -90,42 +90,26 @@ jobs:
9090
- 30
9191
steps:
9292
- uses: actions/checkout@v5
93-
- run: |
94-
echo " =====> /usr/src/nextcloud/"
95-
ls -lA /usr/src/nextcloud/
96-
- run: |
97-
echo " =====> /usr/src/nextcloud/apps/"
98-
ls -lA /usr/src/nextcloud/apps/
99-
- run: |
100-
echo " =====> /usr/src/nextcloud/apps/solid/"
101-
ls -lA /usr/src/nextcloud/apps/solid/
102-
- name: Initialize Nextcloud instance
103-
# @CHECKME: cp site.conf /etc/apache2/sites-enabled/000-default.conf (?)
104-
# @CHECKME: Use env instead?
105-
# env:
106-
# NEXTCLOUD_UPDATE: 1
93+
# @CHECKME: cp site.conf /etc/apache2/sites-enabled/000-default.conf (?)
94+
- env:
95+
NEXTCLOUD_UPDATE: 1
96+
name: Setup Test Environment
10797
run: |
108-
NEXTCLOUD_UPDATE=1 /entrypoint.sh "echo"
98+
git config --global --add safe.directory /usr/src/nextcloud/apps
99+
/entrypoint.sh "echo"
109100
bash "${GITHUB_WORKSPACE}/init.sh"
110-
working-directory: /usr/src/nextcloud/
111-
- name: Copy source-code into place
112-
run: |
113101
rm -r /usr/src/nextcloud/apps/solid/
114102
cp --archive --verbose "${GITHUB_WORKSPACE}/." /usr/src/nextcloud/apps/
115-
- run: |
116-
echo " =====> /usr/src/nextcloud/apps/solid/"
117-
ls -lA /usr/src/nextcloud/apps/solid/
103+
working-directory: /usr/src/nextcloud/
118104
- name: Install and Cache Composer dependencies
119105
uses: ramsey/composer-install@v3
120106
with:
121107
working-directory: /usr/src/nextcloud/apps/solid
122108
env:
123109
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
124110
- name: Run PHPUnit
125-
run: |
126-
/usr/src/nextcloud/apps/solid/bin/phpunit \
127-
--configuration /usr/src/nextcloud/apps/solid/phpunit.xml \
128-
/usr/src/nextcloud/apps/solid/tests/Unit
111+
run: bin/phpunit --configuration phpunit.xml
112+
working-directory: /usr/src/nextcloud/apps/solid/
129113

130114
# 03.quality.php.scan.dependencies-vulnerabilities.yml
131115
scan-dependencies-vulnerabilities:

0 commit comments

Comments
 (0)