diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..718572b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 + +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..aafa404 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -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 diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml new file mode 100644 index 0000000..662569b --- /dev/null +++ b/.github/workflows/pint.yml @@ -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 diff --git a/.github/workflows/laravel.yml b/.github/workflows/run-tests.yml similarity index 81% rename from .github/workflows/laravel.yml rename to .github/workflows/run-tests.yml index 9148a15..e2dd554 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/run-tests.yml @@ -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 @@ -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