-
Notifications
You must be signed in to change notification settings - Fork 25
56 lines (42 loc) · 1.4 KB
/
laravel.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
name: Laravel
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
laravel-tests:
runs-on: ubuntu-latest
timeout-minutes: 7
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: phpunit
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.actions', '.env');"
- name: Install Composer dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Install NPM dependencies
run: npm ci
- name: Build assets
run: npm run prod
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit --configuration phpunit.dist.xml
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
file: ./build/logs/clover.xml # optional
fail_ci_if_error: true # optional (default = false)