-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading larastan/larastan usage in Workflow
- Loading branch information
1 parent
9503064
commit 894500b
Showing
5 changed files
with
91 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: hi-folks/ghygen | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
- features/** | ||
|
||
jobs: | ||
laravel-tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: [ '8.2' ] | ||
dependency-stability: [ 'prefer-none' ] | ||
|
||
name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.dependency-stability }} - ${{ matrix.operating-system}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- name: Install NPM packages | ||
run: npm ci | ||
- name: Build frontend | ||
run: npm run development | ||
- name: Install PHP versions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
- name: Install Dependencies | ||
if: steps.vendor-cache.outputs.cache-hit != 'true' | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
|
||
- name: Update Dependencies with latest stable | ||
if: matrix.dependency-stability == 'prefer-stable' | ||
run: composer update --prefer-stable | ||
- name: Update Dependencies with lowest stable | ||
if: matrix.dependency-stability == 'prefer-lowest' | ||
run: composer update --prefer-stable --prefer-lowest | ||
|
||
- name: Generate key | ||
run: php artisan key:generate | ||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
- name: Run Migrations | ||
# Set environment | ||
env: | ||
SESSION_DRIVER: array | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: ":memory:" | ||
|
||
run: php artisan migrate | ||
|
||
- name: Show dir | ||
run: pwd | ||
- name: PHP Version | ||
run: php --version | ||
|
||
# Code quality | ||
|
||
- name: Execute tests (Unit and Feature tests) via PestPHP | ||
# Set environment | ||
env: | ||
SESSION_DRIVER: array | ||
DB_CONNECTION: sqlite | ||
DB_DATABASE: ":memory:" | ||
|
||
run: vendor/bin/pest | ||
|
||
|
||
|
||
- name: Execute Code Static Analysis (PHP Stan + Larastan) | ||
run: | | ||
vendor/bin/phpstan analyse -c ./phpstan.neon --no-progress | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters