Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 38 additions & 8 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ on:
jobs:
Sqlite:
runs-on: ubuntu-latest
container: kanboard/tests:latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, sqlite3, json, openssl, curl, zip, gd
tools: composer
- name: Checkout Kanboard repo
uses: actions/checkout@v2
with:
Expand All @@ -21,18 +26,26 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Unit tests with Sqlite
run: ./vendor/bin/phpunit -c tests/units.sqlite.xml plugins/Wiki/Test/
run: ./vendor/bin/phpunit --log-junit junit.xml -c tests/units.sqlite.xml plugins/Wiki/Test/
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: junit.xml
check_name: Frontend Test Results

Postgres:
runs-on: ubuntu-latest
container: kanboard/tests:latest
# container: kanboard/tests:latest
needs: Sqlite
services:
postgres:
image: postgres:9.4
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_DB: kanboard_unit_test
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
Expand All @@ -41,6 +54,12 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo_pgsql, json, openssl, curl, zip, gd
tools: composer
- name: Checkout Kanboard repo
uses: actions/checkout@v2
with:
Expand All @@ -54,17 +73,21 @@ jobs:
- name: Unit tests with Postgres
run: ./vendor/bin/phpunit -c tests/units.postgres.xml plugins/Wiki/Test/
env:
DB_HOSTNAME: postgres
DB_HOSTNAME: localhost
DB_PORT: ${{ job.services.postgres.ports[5432] }}

MariaDB:
runs-on: ubuntu-latest
container: kanboard/tests:latest
# container: kanboard/tests:latest
needs: Sqlite
services:
mariadb:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: secret
MARIA_ROOT_PASSWORD: secret
MARIADB_USER: root
MARIADB_DATABASE: kanboard_unit_test
ports:
- 3306:3306
options: >-
Expand All @@ -73,6 +96,12 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, xml, ctype, iconv, intl, pdo_mysql, json, openssl, curl, zip, gd
tools: composer
- name: Checkout Kanboard repo
uses: actions/checkout@v2
with:
Expand All @@ -86,6 +115,7 @@ jobs:
- name: Unit tests with MariaDB
run: ./vendor/bin/phpunit -c tests/units.mysql.xml plugins/Wiki/Test/
env:
DB_HOSTNAME: mariadb
DB_HOSTNAME: 127.0.0.1
DB_PASSWORD: secret
DB_USER: root
DB_PORT: ${{ job.services.mariadb.ports[3306] }}
2 changes: 1 addition & 1 deletion Test/Helper/WikiHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

require_once 'tests/units/Base.php';

use KanboardTests\units\Base;
use Kanboard\Core\Plugin\Loader;
use Kanboard\Plugin\Wiki\Helper\WikiHelper;

Expand Down
2 changes: 1 addition & 1 deletion Test/Model/WikiModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


require_once 'tests/units/Base.php';

use KanboardTests\units\Base;
use Kanboard\Core\Plugin\Loader;
use Kanboard\Plugin\Wiki\Model\WikiModel;
use Kanboard\Model\ProjectModel;
Expand Down
2 changes: 1 addition & 1 deletion Test/PluginTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

require_once 'tests/units/Base.php';

use KanboardTests\units\Base;
use Kanboard\Plugin\Wiki\Plugin;

class PluginTest extends Base
Expand Down