cerebrate/.github/workflows/test.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

2022-01-20 16:23:48 +01:00
name: test
on:
push:
2023-04-06 09:43:40 +02:00
branches: [main, develop, fix-test-action]
2022-01-20 16:23:48 +01:00
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
2023-04-06 09:35:54 +02:00
php: ["8.2"]
2022-01-20 16:23:48 +01:00
steps:
2023-04-06 09:40:01 +02:00
- uses: actions/checkout@v3
2022-01-20 16:23:48 +01:00
- name: Create config files
run: |
cp ./config/app_local.example.php ./config/app_local.php
cp ./config/config.example.json ./config/config.json
- name: Setup MariaDB
uses: getong/mariadb-action@v1.1
with:
host port: 3306
container port: 3306
mysql database: "cerebrate_test"
mysql user: "cerebrate"
mysql password: "cerebrate"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_mysql, mysqli, simplexml
- name: Install dependencies
env:
php_version: ${{ matrix.php }}
run: |
sudo apt-get -y update
sudo apt-get install -y --no-install-recommends curl git zip unzip libicu-dev libxml2-dev
2022-01-20 16:33:28 +01:00
composer install --no-progress --no-interaction
2022-01-20 16:23:48 +01:00
- name: Run tests
2022-01-20 16:33:28 +01:00
run: composer test
2022-01-20 16:23:48 +01:00
env:
DEBUG: true