Skip to content

Commit 0aefaf2

Browse files
committed
Fix tests
Also create a new cache as the old one should be quite out of date and as we now move the vendor somewhere else this is the right time to update the naming.
1 parent acbeded commit 0aefaf2

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed

.github/jobs/configure-checks/all.bats

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ compile_assertions_finished () {
231231
assert_line " - bin..............: /opt/domjudge/domserver/bin"
232232
assert_line " - etc..............: /opt/domjudge/domserver/etc"
233233
assert_line " - lib..............: /opt/domjudge/domserver/lib"
234-
assert_line " - libvendor........: /opt/domjudge/domserver/lib/vendor"
235234
assert_line " - log..............: /opt/domjudge/domserver/log"
236235
assert_line " - run..............: /opt/domjudge/domserver/run"
237236
assert_line " - sql..............: /opt/domjudge/domserver/sql"
@@ -257,7 +256,6 @@ compile_assertions_finished () {
257256
refute_line " * documentation.......: /opt/domjudge/doc"
258257
refute_line " * domserver...........: /opt/domjudge/domserver"
259258
refute_line " - bin..............: /opt/domjudge/domserver/bin"
260-
refute_line " - libvendor........: /opt/domjudge/domserver/lib/vendor"
261259
refute_line " - tmp..............: /opt/domjudge/domserver/tmp"
262260
refute_line " - example_problems.: /opt/domjudge/domserver/example_problems"
263261
refute_line " * judgehost...........: /opt/domjudge/judgehost"
@@ -269,7 +267,6 @@ compile_assertions_finished () {
269267
assert_line " * prefix..............: /tmp"
270268
assert_line " * documentation.......: /tmp/doc"
271269
assert_line " * domserver...........: /tmp/domserver"
272-
assert_line " - libvendor........: /tmp/domserver/lib/vendor"
273270
assert_line " * judgehost...........: /tmp/judgehost"
274271
assert_line " - judge............: /tmp/judgehost/judgings"
275272
}
@@ -291,7 +288,6 @@ compile_assertions_finished () {
291288
assert_line " - bin..............: /usr/local/bin"
292289
assert_line " - etc..............: /usr/local/etc/domjudge"
293290
assert_line " - lib..............: /usr/local/lib/domjudge"
294-
assert_line " - libvendor........: /usr/local/lib/domjudge/vendor"
295291
assert_line " - log..............: /usr/local/var/log/domjudge"
296292
assert_line " - run..............: /usr/local/var/run/domjudge"
297293
assert_line " - sql..............: /usr/local/share/domjudge/sql"
@@ -319,7 +315,6 @@ compile_assertions_finished () {
319315
assert_line " - bin..............: /usr/local/bin"
320316
assert_line " - etc..............: /usr/local/etc/domjudge"
321317
assert_line " - lib..............: /usr/local/lib/domjudge"
322-
assert_line " - libvendor........: /usr/local/lib/domjudge/vendor"
323318
assert_line " - log..............: /usr/local/var/log/domjudge"
324319
assert_line " - run..............: /usr/local/var/run/domjudge"
325320
assert_line " - sql..............: /usr/local/share/domjudge/sql"

gitlab/base.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ parameters:
4848
domjudge.webappdir: /webapp
4949
domjudge.libdir: /lib
5050
domjudge.sqldir: /sql
51-
domjudge.libvendordir: /lib/vendor
51+
domjudge.libvendordir: /webapp/vendor
5252
domjudge.logdir: /output/log
5353
domjudge.rundir: /output/run
5454
domjudge.tmpdir: /output/tmp
@@ -57,7 +57,7 @@ EOF
5757

5858
# install check if the cache might be dirty
5959
set +e
60-
composer install --no-scripts || rm -rf lib/vendor
60+
composer install --no-scripts || rm -rf webapp/vendor
6161
set -e
6262

6363
# install all php dependencies

gitlab/ci/template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
.cached_vendor:
2828
extends: [.clean_ordering]
2929
cache:
30-
key: libvendor-260522
30+
key: webappvendor-240427
3131
paths:
32-
- lib/vendor/
32+
- webapp/vendor/
3333

3434
.mysql_job:
3535
script:

phpstan.dist.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ parameters:
2222
message: "#Method .* return type has no value type specified in iterable type array#"
2323
path: webapp/src/DataFixtures/Test
2424
includes:
25-
- lib/vendor/phpstan/phpstan-doctrine/extension.neon
25+
- webapp/vendor/phpstan/phpstan-doctrine/extension.neon

webapp/bin/phpunit

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ if (!ini_get('date.timezone')) {
55
ini_set('date.timezone', 'UTC');
66
}
77

8-
if (is_file(dirname(__DIR__, 2) . '/lib/vendor/phpunit/phpunit/phpunit')) {
8+
if (is_file(dirname(__DIR__, 2) . '/webapp/vendor/phpunit/phpunit/phpunit')) {
99
if (PHP_VERSION_ID >= 80000) {
10-
require dirname(__DIR__, 2) . '/lib/vendor/phpunit/phpunit/phpunit';
10+
require dirname(__DIR__, 2) . '/webapp/vendor/phpunit/phpunit/phpunit';
1111
} else {
12-
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__, 2) . '/lib/vendor/autoload.php');
12+
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__, 2) . '/webapp/vendor/autoload.php');
1313
require PHPUNIT_COMPOSER_INSTALL;
1414
PHPUnit\TextUI\Command::main();
1515
}
1616
} else {
1717
if (!is_file(dirname(__DIR__,
18-
2) . '/lib/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
18+
2) . '/webapp/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
1919
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
2020
exit(1);
2121
}
2222

23-
require dirname(__DIR__, 2) . '/lib/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
23+
require dirname(__DIR__, 2) . '/webapp/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
2424
}

webapp/tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use Symfony\Component\Dotenv\Dotenv;
44

5-
require dirname(__DIR__, 2) . '/lib/vendor/autoload.php';
5+
require dirname(__DIR__, 2) . '/webapp/vendor/autoload.php';
66
require dirname(__DIR__) . '/config/load_db_secrets.php';
77

88
if (file_exists(dirname(__DIR__) . '/config/bootstrap.php')) {

0 commit comments

Comments
 (0)