Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,23 @@ on:
push:
branches: [master]
jobs:
install_tools:
name: Install tools
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install tools
uses: ngmy/phive-install-action@master
- name: Upload tools to artifact store
uses: actions/upload-artifact@v7
with:
name: tools
path: tools

coverage:
name: coverage
needs: install_tools
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
43 changes: 5 additions & 38 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ jobs:
name: tools
path: tools
test:
name: test
name: Test suite
needs: install_tools
strategy:
fail-fast: false
matrix:
operating-system: ["ubuntu-latest", "macOs-latest"]
operating-system: ["ubuntu-latest", "macOs-latest", "windows-latest"]
php-versions: ["8.5"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Set autocrlf on windows
if: matrix.operating-system == 'windows-latest'
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@v7
- name: Setup PHP, with composer and extensions
Expand All @@ -42,45 +45,9 @@ jobs:
with:
name: tools
path: tools
- name: Set tools as an executable
run: find tools -type f -print0 | xargs -0 chmod +x
- name: Check coding standard
run: composer cs:check
- name: Static analysis tool
run: composer analytics
- name: Test suite
run: composer test
test-windows:
name: test-windows
needs: install_tools
strategy:
fail-fast: false
matrix:
php-versions: ["8.5"]
runs-on: windows-latest
steps:
- name: Set autocrlf
run: git config --global core.autocrlf false
- name: Checkout
uses: actions/checkout@v7
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: libxml, simplexml, dom
coverage: none
- name: Install composer dependencies
uses: ramsey/composer-install@v4
with:
composer-options: "--prefer-dist --optimize-autoloader"
- name: Download tools from artifact store
uses: actions/download-artifact@v7
with:
name: tools
path: tools
- name: Check coding standard
run: php tools/php-cs-fixer fix -v --diff --dry-run
- name: Static analysis tool
run: php tools/phpstan analyze
- name: Test suite
run: composer test
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="^2.2.9" installed="2.2.9" location="./tools/phpstan" copy="false"/>
<phar name="php-cs-fixer" version="^3.95.23" installed="3.95.23" location="./tools/php-cs-fixer" copy="false"/>
<phar name="phpunit" version="^13.3.2" installed="13.3.2" location="./tools/phpunit" copy="false"/>
</phive>
16 changes: 4 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,28 @@
}
},
"require-dev": {
"pestphp/pest": "^5",
"mikey179/vfsstream": "^1.6"
},
"scripts": {
"analytics": "tools/phpstan",
"analytics": "php tools/phpstan",
"check": [
"@test",
"@analytics",
"@cs:fix"
],
"coverage": "@test --coverage",
"coverage:html": "@test --coverage-html coverage/",
"coverage:clover": "@test --coverage-clover clover.xml",
"cs:check": "tools/php-cs-fixer fix -v --diff --dry-run",
"cs:fix": "tools/php-cs-fixer fix -v --diff",
"test": "pest"
"cs:check": "php tools/php-cs-fixer fix -v --diff --dry-run",
"cs:fix": "php tools/php-cs-fixer fix -v --diff",
"test": "php tools/phpunit"
},
"scripts-descriptions": {
"analytics": "Run static analysis tool",
"check": "Perform all tests and analysis, required before submitting a pull request",
"cs:check": "Run code style analysis, without fixing errors",
"cs:fix": "Run code style analysis and fix errors",
"coverage": "Show coverage report to the console",
"coverage:html": "Create a code coverage report in html format, into the `coverage/` directory",
"coverage:clover": "Create a code coverage report in xml format, into the `clover.xml` file",
"test": "Run the test suite"
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
40 changes: 0 additions & 40 deletions tests/Datasets/Inclusion.php

This file was deleted.

103 changes: 0 additions & 103 deletions tests/Datasets/Xml.php

This file was deleted.

83 changes: 0 additions & 83 deletions tests/Datasets/XmlNoTypes.php

This file was deleted.

Loading