Skip to content

Commit 306a034

Browse files
authored
Boost test coverage (#62)
* Boost test coverage * Test against composer template
1 parent c167d3a commit 306a034

File tree

1 file changed

+19
-30
lines changed

1 file changed

+19
-30
lines changed

.circleci/config.yml

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,33 +42,6 @@ commands:
4242
composer require mglaman/phpstan-drupal *@dev
4343
cp ~/repo/tests/fixtures/config/drupal-phpstan.neon /tmp/drupal/phpstan.neon
4444
./vendor/bin/phpstan --version
45-
global-require:
46-
steps:
47-
- run:
48-
name: Add PHPStan
49-
command: |
50-
composer global require phpstan/phpstan
51-
- run:
52-
name: Remove vendor directory
53-
command: |
54-
rm -rf vendor
55-
- run:
56-
name: Add project as a global dependency
57-
command: |
58-
composer global config repositories.phpstanDrupal '{"type": "path", "url": "~/repo", "options": { "symlink": false }}'
59-
- run:
60-
name: Add globally
61-
command: |
62-
composer global require mglaman/phpstan-drupal *@dev
63-
- run:
64-
name: Add Composer global path
65-
command: |
66-
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> $BASH_ENV
67-
echo $BASH_ENV
68-
- run:
69-
name: Check drupal-check can be executed
70-
command: |
71-
phpstan --version
7245
jobs:
7346
build:
7447
<<: *defaults
@@ -94,16 +67,32 @@ jobs:
9467
name: Run against a file
9568
command: |
9669
cd /tmp/drupal
97-
./vendor/bin/phpstan analyze core/install.php
70+
./vendor/bin/phpstan analyze core/install.php --debug
71+
- run:
72+
name: Run against a module
73+
command: |
74+
cd /tmp/drupal
75+
./vendor/bin/phpstan analyze core/modules/dynamic_page_cache --debug
76+
test_drupal_project:
77+
<<: *defaults
78+
steps:
79+
- start-project
80+
- create-drupal-project
81+
- local-require
82+
- run:
83+
name: Run against a file
84+
command: |
85+
cd /tmp/drupal
86+
./vendor/bin/phpstan analyze web/core/install.php --debug
9887
- run:
9988
name: Run against a module
10089
command: |
10190
cd /tmp/drupal
102-
./vendor/bin/phpstan analyze core/modules/dynamic_page_cache | grep -q "not found and could not be autoloaded." && false || true
103-
91+
./vendor/bin/phpstan analyze web/core/modules/dynamic_page_cache --debug
10492
workflows:
10593
version: 2
10694
tests:
10795
jobs:
10896
- build
10997
- test_drupal
98+
- test_drupal_project

0 commit comments

Comments
 (0)