2020-05-31 14:36:09 +02:00
|
|
|
name: Tests
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Composer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
|
|
run: composer validate
|
|
|
|
- name: Install dependencies
|
2021-01-05 19:16:22 +01:00
|
|
|
run: /usr/bin/php7.4 composer install --prefer-dist --no-suggest
|
2020-05-31 14:36:09 +02:00
|
|
|
PHPunit:
|
2020-05-31 15:53:57 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-31 14:36:09 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
|
|
|
|
name: PHP ${{ matrix.php-versions }} unit tests on ${{ matrix.operating-system }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup PHP
|
2020-05-31 15:53:57 +02:00
|
|
|
uses: shivammathur/setup-php@v2
|
2020-05-31 14:36:09 +02:00
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-versions }}
|
2020-05-31 15:53:57 +02:00
|
|
|
extensions: gd, sqlite3
|
2020-05-31 15:10:30 +02:00
|
|
|
- name: Remove composer lock
|
|
|
|
run: rm composer.lock
|
2020-05-31 14:45:25 +02:00
|
|
|
- name: Setup PHPunit
|
|
|
|
run: composer install -n
|
2020-05-31 14:42:11 +02:00
|
|
|
- name: Run unit tests
|
2020-05-31 15:24:10 +02:00
|
|
|
run: ../vendor/bin/phpunit --no-coverage
|
2020-05-31 14:42:11 +02:00
|
|
|
working-directory: tst
|
2020-05-31 14:36:09 +02:00
|
|
|
Mocha:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12'
|
|
|
|
- name: Setup Mocha
|
|
|
|
run: npm install -g mocha
|
|
|
|
- name: Setup Node modules
|
2020-05-31 14:42:11 +02:00
|
|
|
run: npm install
|
|
|
|
working-directory: js
|
2020-05-31 14:36:09 +02:00
|
|
|
- name: Run unit tests
|
|
|
|
run: mocha
|
2020-05-31 14:42:11 +02:00
|
|
|
working-directory: js
|
|
|
|
|