Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markhalliwell committed Mar 18, 2021
1 parent 8edaa95 commit 043de0a
Show file tree
Hide file tree
Showing 88 changed files with 3,079 additions and 3,760 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- uses: shivammathur/setup-php@v2
with:
Expand All @@ -63,6 +65,15 @@ jobs:
coverage: pcov
tools: composer:v2

- uses: actions/setup-node@v2
with:
node-version: '15'

- uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}

- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -73,6 +84,9 @@ jobs:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}

- if: steps.cache-node.outputs.cache-hit != 'true'
run: npm install

- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: "Use PHPUnit 9.3+ on PHP 8"
Expand All @@ -81,6 +95,12 @@ jobs:

- run: composer update -o --no-progress ${{ matrix.composer-flags }}

- run: composer require scrutinizer/ocular:^1.8.1
if: ${{ matrix.coverage }}

- name: Build Datasets
run: composer build

- run: vendor/bin/phpunit --colors=always --no-coverage ${{ matrix.phpunit-flags }}
if: ${{ !matrix.coverage }}

Expand Down Expand Up @@ -142,4 +162,4 @@ jobs:

- run: composer update -o --no-progress

- run: vendor/bin/psalm --no-progress --output-format=github --shepherd || true
- run: vendor/bin/psalm --config=psalm.xml --no-cache --no-progress --output-format=github --shepherd
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ checks:
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
fix_doc_comments: false
tools:
external_code_coverage:
timeout: 1800
Expand Down
25 changes: 10 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,16 @@
"doctrine/lexer": "^1.2",
"league/configuration": "dev-main",
"psr/event-dispatcher": "^1.0",
"symfony/polyfill-php80": "^1.15"
"symfony/polyfill-php80": "^1.22.1",
"vimeo/psalm": "^4.6.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"phpstan/phpstan": "^0.12.42",
"phpunit/phpunit": "^8.5.8",
"scrutinizer/ocular": "^1.5",
"sempro/phpunit-pretty-print": "^1.4",
"squizlabs/php_codesniffer": "^3.5",
"unleashedtech/php-coding-standard": "^2.5",
"vimeo/psalm": "^3.14"
},
"conflict": {
"scrutinizer/ocular": "1.7.*",
"vimeo/psalm": "3.15.0"
"friendsofphp/php-cs-fixer": "^2.18.3",
"phpstan/phpstan": "^0.12.81",
"phpunit/phpunit": "^8.5.15",
"sempro/phpunit-pretty-print": "^1.4.0",
"squizlabs/php_codesniffer": "^3.5.8",
"unleashedtech/php-coding-standard": "^2.7.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -104,13 +99,13 @@
]
},
"scripts": {
"build": "npm install && npm run build && php ./scripts/build.php",
"build": "npm run build && php ./scripts/build.php",
"fix": "vendor/bin/phpcbf",
"phpcs": "vendor/bin/phpcs",
"phpstan": "vendor/bin/phpstan analyse",
"phpunit": "./scripts/phpunit --no-coverage --colors=always",
"phpunit-coverage": "./scripts/phpunit --colors=always",
"psalm": "vendor/bin/psalm --config=psalm.xml --output-format=phpstorm --show-info=true --stats --threads=4",
"psalm": "vendor/bin/psalm --config=psalm.xml --no-cache --output-format=phpstorm --show-info=true --stats --threads=4",
"test": [
"@phpcs",
"@phpstan",
Expand Down
Loading

0 comments on commit 043de0a

Please sign in to comment.