-
Notifications
You must be signed in to change notification settings - Fork 47
50 lines (40 loc) · 1.23 KB
/
main.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
name: Laravel Package Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, xml, ctype, iconv, mysql
- name: Cache Composer Packages
uses: actions/cache@v2
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-git
- name: Setup Laravel Application
run: |
composer create-project --prefer-dist laravel/laravel laravel_app --no-interaction
cd laravel_app
composer require devdojo/auth:dev-main --W
- name: Set Working Directory
run: echo "Change directory context to Laravel app"
working-directory: ./laravel_app
- name: Update Package
run: composer update devdojo/auth:dev-main
working-directory: ./laravel_app
- name: Run Migrations
run: php artisan migrate
working-directory: ./laravel_app
- name: Run Tests
run: ./vendor/bin/pest
working-directory: ./laravel_app