Skip to content

Commit 3fd8397

Browse files
authored
Tidy up (#28)
* Delete package-lock.json * Update .env.testing * Tidy up GH workflow for PHP * Update Pest test scripts * Create package-lock.json * Update composer.json * Update php.yml * Update php.yml
1 parent 03eb5a5 commit 3fd8397

File tree

4 files changed

+23
-335
lines changed

4 files changed

+23
-335
lines changed

.env.testing

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
APP_NAME="TEST Laravel Inertia Template"
1+
APP_NAME="TEST - Laravel Inertia Template"
22
APP_ENV=testing
3-
APP_KEY=base64:jpd/wy450S/8N0y6OfuRoZ8yS3AWEzrbkSgo08djF4w=
3+
APP_KEY=base64:PGFsMHQa3kYad6OZbsaYzBnrdzxN3x+sfkkmqogVDuk=
44
APP_DEBUG=true
55
APP_URL=http://laravel-inertia-template.test
66

.github/workflows/php.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ jobs:
4848
tools: composer:v2
4949

5050
- name: Build
51-
if: steps.cache-vendor.outputs.cache-hit != 'true'
52-
run: build:test
51+
run: composer build:lint
5352

5453
- name: Lint against Laravel code style
5554
run: composer lint
@@ -58,10 +57,6 @@ jobs:
5857
name: Test
5958
needs: [dependencies, lint]
6059
runs-on: ubuntu-latest
61-
env:
62-
APP_ENV: testing
63-
DB_CONNECTION: sqlite
64-
DB_DATABASE: ":memory:"
6560

6661
steps:
6762
- uses: actions/checkout@v3
@@ -79,15 +74,12 @@ jobs:
7974
tools: composer:v2
8075
coverage: xdebug
8176

82-
- name: Build
83-
if: steps.cache-vendor.outputs.cache-hit != 'true'
84-
run: build:test
85-
8677
- name: Setup application
8778
run: |
8879
cp .env.testing .env
89-
php artisan key:generate
90-
php artisan migrate:fresh --seed --seeder=TestsSeeder
80+
81+
- name: Build
82+
run: composer build:test
9183

9284
- name: Run tests
9385
run: composer test:coverage

composer.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
}
3939
},
4040
"scripts": {
41+
"build:lint": [
42+
"composer install --no-interaction"
43+
],
44+
"build:test": [
45+
"composer install --no-interaction",
46+
"php artisan key:generate --env=testing",
47+
"php artisan migrate:fresh --seed --seeder=TestsSeeder"
48+
],
4149
"build:dev": [
4250
"composer install",
4351
"php artisan migrate:fresh --seed",
@@ -50,20 +58,17 @@
5058
"npm install",
5159
"npm run build"
5260
],
53-
"build:test": [
54-
"composer install --no-interaction"
55-
],
5661
"lint": [
5762
"./vendor/bin/pint --test"
5863
],
5964
"fix": [
6065
"./vendor/bin/pint"
6166
],
6267
"test": [
63-
"php artisan test --parallel --stop-on-failure --processes=8"
68+
"./vendor/bin/pest --parallel --stop-on-failure --processes=8"
6469
],
6570
"test:coverage": [
66-
"XDEBUG_MODE=coverage php artisan test --parallel --coverage --min=85 --processes=8 --stop-on-failure"
71+
"XDEBUG_MODE=coverage ./vendor/bin/pest --parallel --coverage --min=85 --processes=8 --stop-on-failure"
6772
],
6873
"post-autoload-dump": [
6974
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
@@ -79,12 +84,18 @@
7984
"@php artisan key:generate --ansi"
8085
]
8186
},
87+
"extra": {
88+
"laravel": {
89+
"dont-discover": []
90+
}
91+
},
8292
"config": {
8393
"optimize-autoloader": true,
8494
"preferred-install": "dist",
8595
"sort-packages": true,
8696
"allow-plugins": {
87-
"pestphp/pest-plugin": true
97+
"pestphp/pest-plugin": true,
98+
"php-http/discovery": true
8899
}
89100
},
90101
"minimum-stability": "stable",

0 commit comments

Comments
 (0)