-
-
Notifications
You must be signed in to change notification settings - Fork 29
57 lines (51 loc) · 1.41 KB
/
laravel-mysql.yml
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
57
# GitHub Action for Laravel with MySQL and Redis
name: tests
on: [ push, pull_request ]
jobs:
phpunit:
runs-on: ubuntu-latest
container:
image: kirschbaumdevelopment/laravel-test-runner:8.1
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: minetrax
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: minetrax
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install composer dependencies
run: |
composer install --no-scripts
- name: Install npm dependencis
run: |
npm ci
- name: Prepare Laravel Application
run: |
cp .env.example .env
php artisan key:generate
php artisan migrate -v
npm run prod
env:
DB_HOST: mysql
REDIS_HOST: redis
APP_DEBUG: true
- name: Run Test Suite
run: php artisan test
env:
DB_HOST: mysql
REDIS_HOST: redis
APP_DEBUG: true