F/tests #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |