Skip to content

Commit

Permalink
split workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyentranchung committed Jun 19, 2024
1 parent 987c505 commit eefcdc9
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
25 changes: 25 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PHPStan Check

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
laravel-tests:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761
with:
php-version: "8.2"
- uses: actions/checkout@v4
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: phpstan analyse
run: ./vendor/bin/phpstan analyse
25 changes: 25 additions & 0 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Format Check

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
laravel-tests:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761
with:
php-version: "8.2"
- uses: actions/checkout@v4
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: pint format
run: ./vendor/bin/pint
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
- uses: shivammathur/setup-php@fc14643b0a99ee9db10a3c025a33d76544fa3761
with:
php-version: "8.2"
- uses: actions/checkout@v4
Expand All @@ -27,10 +27,6 @@ jobs:
run: |
mkdir -p database
touch database/database.sqlite
- name: phpstan analyse
run: ./vendor/bin/phpstan analyse
- name: pint format
run: ./vendor/bin/pint
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
env:
DB_CONNECTION: sqlite
Expand Down

0 comments on commit eefcdc9

Please sign in to comment.