-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (38 loc) · 1.19 KB
/
testing.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
name: Testing
on: [push]
jobs:
test:
runs-on: ubuntu-20.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_DATABASE: mobile-admin-test
MYSQL_USER: mobile-admin
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
ports:
- 3306:3306
# See https://firefart.at/post/using-mysql-service-with-github-actions/
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.13.0
- name: Checkout code
uses: actions/checkout@v3
- name: Install PHP dependencies
run: composer install --no-interaction --no-progress --no-scripts
- name: Generate key
run: php artisan key:generate --env=testing
- name: Migrate database
run: php artisan migrate --env=testing
- name: Build Twill assets
run: php artisan twill:build --env=testing
- name: Run PHPUnit
run: php artisan test --env=testing