Skip to content

Commit

Permalink
Adds type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Feb 22, 2023
1 parent 4dd0f94 commit 452f97b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: static analysis

on:
push:
branches:
- master
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-22.04

strategy:
fail-fast: true

name: Static Analysis

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Execute type checking
run: vendor/bin/phpstan
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^7.0|^8.0|^9.0"
},
"autoload": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
paths:
- src

level: 0

0 comments on commit 452f97b

Please sign in to comment.