-
Notifications
You must be signed in to change notification settings - Fork 15
39 lines (36 loc) · 1007 Bytes
/
unit-tests.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
name: Run unit tests
on:
pull_request:
branches:
- master
- develop
jobs:
tests:
runs-on: ubuntu-latest
container: lorisleiva/laravel-docker:8.1
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: hackgreenville
MYSQL_USER: hackgreenville
MYSQL_ROOT_PASSWORD: test
MYSQL_PASSWORD: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: install php dependencies
run: composer install
- name: install node dependencies
run: yarn install
- name: copy environment variables to .env
run: cp .env.ci .env
- name: migrate database
run: php artisan migrate --seed
- name: Build website
run: yarn build
- name: run tests
run: php artisan test