-
Notifications
You must be signed in to change notification settings - Fork 6
52 lines (45 loc) · 1.23 KB
/
phpunit.yml
File metadata and controls
52 lines (45 loc) · 1.23 KB
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
name: PHPUnit
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: PHPUnit
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8
env:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: application
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, gd
tools: composer
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Start MariaDB
run: sudo /etc/init.d/mysql start
- name: Execute tests
run: |
php artisan migrate --force --quiet --no-interaction
vendor/bin/phpunit
env:
DB_HOST: 127.0.0.1
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_DATABASE: application
DB_USERNAME: root
DB_PASSWORD: secret