-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (46 loc) · 1.42 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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
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/