-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.05 KB
/
ci.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
name: Laravel
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: composer install
run: docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/var/www/html" -w /var/www/html laravelsail/php82-composer:latest composer install --ignore-platform-reqs
- name: start mysql
run: ./vendor/bin/sail up -d mysql
- name: start Laravel Sail
run: ./vendor/bin/sail up -d
- name: change permission
run: sudo chmod -R 777 .
- name: generate key
run: ./vendor/bin/sail artisan key:generate
- name: migrate
run: ./vendor/bin/sail artisan migrate
- name: npm install
run: ./vendor/bin/sail npm install
- name: npm run dev
run: ./vendor/bin/sail npm run build
- name: test
run: ./vendor/bin/sail test
- name: larastan
run: ./vendor/bin/sail artisan larastan --without-tty