Skip to content

Commit 9d7ca51

Browse files
committed
Add job to test phpstan dev
1 parent af28bcf commit 9d7ca51

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/phpstan-dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PHPStan dev
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
schedule:
8+
- cron: 0 0 * * *
9+
jobs:
10+
verify:
11+
runs-on: "ubuntu-latest"
12+
name: Lint
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
- name: "Install PHP"
17+
uses: "shivammathur/setup-php@v2"
18+
with:
19+
coverage: "none"
20+
php-version: 8.1
21+
tools: composer:v2
22+
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, gd
23+
- name: "Bump PHPStan"
24+
run: "composer require --no-update phpstan/phpstan:1.7.x-dev"
25+
- name: "Add phpspec/prophecy-phpunit"
26+
run: "composer require phpspec/prophecy-phpunit:^2 --dev --no-update"
27+
- name: "Install dependencies"
28+
run: "composer update --no-progress --prefer-dist"
29+
- name: "PHPCS"
30+
run: "php vendor/bin/phpcs"
31+
- name: "PHPStan"
32+
run: "php vendor/bin/phpstan analyze"
33+
- name: "PHPUnit"
34+
run: "php vendor/bin/phpunit"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"require": {
1313
"php": "^7.4 || ^8.0",
1414
"symfony/finder": "~3.4.5 ||^4.2 || ^5.0 || ^6.0",
15-
"phpstan/phpstan": "~1.7.0",
15+
"phpstan/phpstan": "^1.7.0",
1616
"symfony/yaml": "~3.4.5 || ^4.2|| ^5.0 || ^6.0",
1717
"webflo/drupal-finder": "^1.2"
1818
},

0 commit comments

Comments
 (0)