Skip to content

Commit 8be3bd1

Browse files
Alexey Abelalexeyabel
authored andcommitted
Update and fix github actions
1 parent 69b8d42 commit 8be3bd1

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
run: sudo apt update && sudo apt install composer php-sqlite3
99

1010
- name: Checkout latest Nextcloud
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212
with:
1313
repository: nextcloud/server
1414
path: ./nextcloud
@@ -22,14 +22,20 @@ jobs:
2222
run: php occ maintenance:install --database "sqlite" --database-name "nextcloud" --admin-user "admin" --admin-pass "adminpassword"
2323

2424
- name: Checkout user_backend_sql_raw (test subject)
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626
with:
2727
path: ./nextcloud/apps/user_backend_sql_raw
2828

2929
- name: Install PHP dependencies with composer
30-
working-directory: ./nextcloud/apps/user_backend_sql_raw
31-
run: php7.4 /usr/bin/composer install
30+
uses: php-actions/composer@v6
31+
with:
32+
php_version: 8.3
33+
working_dir: ./nextcloud/apps/user_backend_sql_raw
3234

33-
- name: Run all tests
35+
# As of 2024-04-28 can't use php-actions/phpunit here, because it has no
36+
# way to set the working path. Setting `configuration` or `testsuite` to
37+
# the location of the phpunit.xml file makes it complain about composer.json
38+
# not being there. Therefore, using "raw" phpunit call.
39+
- name: Run all PHPUnit tests
3440
working-directory: ./nextcloud/apps/user_backend_sql_raw
35-
run: php7.4 ./vendor/phpunit/phpunit/phpunit
41+
run: php ./vendor/phpunit/phpunit/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"php": ">=7.0"
2828
},
2929
"require-dev": {
30-
"php": ">=7.2",
30+
"php": ">=7.3",
3131
"phpunit/phpunit": "^9"
3232
}
3333
}

phpunit.xml.dist renamed to phpunit.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<phpunit bootstrap="../../tests/bootstrap.php" colors="true">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/|version|/phpunit.xsd"
4+
bootstrap="../../tests/bootstrap.php" colors="true">
25
<testsuites>
36
<testsuite name="unit">
47
<directory>./tests/Unit</directory>

0 commit comments

Comments
 (0)