From 08cd0b64e9352543f3abdae1018f1b4ab1e4866d Mon Sep 17 00:00:00 2001 From: Edward Chernenko Date: Sun, 15 Sep 2024 23:44:12 +0300 Subject: [PATCH] (tests) Update software used when testing --- .github/workflows/main.yml | 26 +++++++++++++------------- composer.json | 10 +++++++--- tests/phpunit/EventCalendarTest.php | 2 +- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 858d734..893c5f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: env: branch: ${{ matrix.branch }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 services: memcached: image: memcached:latest @@ -25,15 +25,15 @@ jobs: - 11211:11211 options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5 mariadb: - image: mariadb:10 + image: mariadb env: MYSQL_ALLOW_EMPTY_PASSWORD: 1 ports: - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: | buildcache @@ -61,14 +61,14 @@ jobs: # PHP linters: phpcs, parallel-lint, etc. linter: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' tools: composer - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.composer/cache key: buildcache-linter @@ -77,17 +77,17 @@ jobs: # Phan (PHP static analyzer) phan: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: branch: REL1_39 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' extensions: ast tools: composer - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.composer/cache diff --git a/composer.json b/composer.json index 07f0bdf..503bec7 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,10 @@ { "require-dev": { - "php-parallel-lint/php-parallel-lint": "1.3.2", "php-parallel-lint/php-console-highlighter": "1.0.0", "mediawiki/minus-x": "1.1.1", - "mediawiki/mediawiki-codesniffer": "39.0.0", - "mediawiki/mediawiki-phan-config": "0.11.0" + "mediawiki/mediawiki-codesniffer": "44.0.0", + "mediawiki/mediawiki-phan-config": "0.14.0" }, "scripts": { "test": [ @@ -17,5 +16,10 @@ "minus-x fix .", "phpcbf" ] + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/tests/phpunit/EventCalendarTest.php b/tests/phpunit/EventCalendarTest.php index d7a8b94..6070748 100644 --- a/tests/phpunit/EventCalendarTest.php +++ b/tests/phpunit/EventCalendarTest.php @@ -523,7 +523,7 @@ public function dataProvider() { [ 'title' => 'Test Event 2', 'start' => '2022-05-10', - 'end' => '2022-04-15', // Not increased by +1 day (because of excludeLastDay=1). + 'end' => '2022-04-15', // Not increased by +1 day (because of excludeLastDay=1). 'url' => '/wiki/2022/05/10:2022/04/15_Test_Event_2' ], [