mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
42 lines
876 B
YAML
42 lines
876 B
YAML
name: Tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
php: [7.1, 7.2, 7.3]
|
|
db: ['mysql:5.7', mariadb]
|
|
|
|
services:
|
|
mysql:
|
|
image: ${{ matrix.db }}
|
|
ports:
|
|
- 13306:3306
|
|
|
|
name: PHP ${{ matrix.php }} with ${{ matrix.db }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Select PHP version
|
|
run: sudo update-alternatives --set php $(which php${{ matrix.php }})
|
|
|
|
- name: Create MySQL Database
|
|
run: mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306
|
|
|
|
- name: Install Composer dependencies
|
|
run: composer install
|
|
|
|
- name: Setup Composer tests
|
|
run: composer test:setup
|
|
env:
|
|
DB_PORT: 13306
|
|
DB_PASSWORD: root
|
|
|
|
- name: Run Composer tests
|
|
run: composer test
|