Skip to content

F/tests

F/tests #8

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]
db: [sqlite]
# 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 phpenv
run: |
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | PHPENV_ROOT=$HOME/.phpenv-root bash
ls $PHPENV_ROOT
ls $PHPENV_ROOT/bin
echo 'export PATH="${PHPENV_ROOT}/bin:${PATH}"' >> ~/.bash_profile
export PATH="${PHPENV_ROOT}/bin:${PATH}"
eval "$(phpenv init -)"
exec $SHELL -l
- name: Clone Kanboard repository
run: git clone --depth 1 $KANBOARD_REPO
- name: Create symbolic link
run: ln -s ${{ github.workspace }} kanboard/plugins/$PLUGIN
- name: Install Composer dependencies
run: |
cd kanboard
phpenv config-add tests/php.ini
composer install
- name: List plugin directory
run: ls -la plugins/
- name: Run PHPUnit tests
run: phpunit -c tests/units.${{ matrix.db }}.xml plugins/$PLUGIN/Test/