-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.68 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
on: push
name: LaravelCI
jobs:
laravel-tests-phpunit:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.0
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429
with:
php-version: '8.1'
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Prepare Laravel Application
run: |
cp .env.ci .env
php artisan key:generate
vendor/bin/phpunit