Skip to content

F/tests

F/tests #2

Workflow file for this run

name: 'Unit Tests'
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.0, 5.6]
db: [sqlite, mysql, postgres]
env:
PLUGIN: Wiki
KANBOARD_REPO: https://github.com/kanboard/kanboard.git
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install Composer dependencies
run: composer install
- name: Clone Kanboard repository
run: git clone --depth 1 $KANBOARD_REPO
- name: Create symbolic link
run: ln -s ${{ github.workspace }} kanboard/plugins/$PLUGIN
- name: Configure PHP environment
run: phpenv config-add tests/php.ini
- name: List plugin directory
run: ls -la plugins/
- name: Run PHPUnit tests
run: phpunit -c tests/units.${{ matrix.db }}.xml plugins/$PLUGIN/Test/