-
-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (79 loc) · 3.07 KB
/
install-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Install in Laravel"
on:
pull_request: null
push:
branches:
- "master"
# Add [skip ci] to commit message to skip CI.
permissions:
contents: "read"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
laravel_install:
name: "${{ matrix.os }} - PHP ${{ matrix.php }} - ${{ matrix.stability }}"
strategy:
fail-fast: true
matrix:
os:
- "ubuntu-22.04"
php:
- "8.3"
stability:
- "prefer-stable"
laravel:
- "11.x"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: "bash"
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v4"
-
name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: "dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, fileinfo, exif"
coverage: "none"
-
name: "Install Root in Laravel"
run: |
git clone -b ${{ matrix.laravel }} https://github.com/laravel/laravel.git laravel
cd laravel/
composer config repositories.0 '{ "type": "path", "url": "../", "options": { "symlink": false } }'
composer require --no-interaction --no-progress --dev --${{ matrix.stability }} --prefer-dist --update-with-dependencies "conedevelopment/root:dev-${{ github.sha }} || dev-${{ github.ref_name }}"
# APP_ENV is local
cp -v .env.example .env
sed -i -e 's#^DB_CONNECTION=.*$#DB_CONNECTION=sqlite#' .env
sed -i -e 's#^DB_DATABASE=.*$#DB_DATABASE=:memory:#' .env
php artisan key:generate
php artisan root:install --seed
php artisan root:publish --packages
-
name: "Perform static analysis on stubs"
working-directory: "laravel"
run: |
composer require --no-interaction --dev --prefer-dist nunomaduro/larastan
php artisan root:action FooBar
php artisan root:field FooBar
php artisan root:filter FooBar
php artisan root:resource FooBar --model 'App\Models\User'
php artisan root:widget FooBar
vendor/bin/phpstan analyze -c vendor/nunomaduro/larastan/extension.neon -l 5 $(find app/Root/ -type f -name FooBar.php)
-
name: "Install front-end dependencies"
working-directory: "laravel"
run: |
# laravel-vite-plugin is a devDependency
#npm install --production
npm install
-
name: "Build front-end"
working-directory: "laravel"
run: |
npm run build