fix: date #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push] | |
jobs: | |
run-tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ["7.4", "8.0"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ matrix.php }} | |
- name: Install Composer | |
uses: php-actions/composer@v6 | |
with: | |
php_version: ${{ matrix.php }} | |
php_extensions: xsl | |
command: update | |
args: --prefer-lowest --prefer-stable | |
- name: Run PHPUnit | |
uses: php-actions/phpunit@v3 | |
with: | |
php_version: ${{ matrix.php }} | |
php_extensions: xsl | |
version: 8 | |
bootstrap: vendor/autoload.php | |
configuration: phpunit.xml | |
args: --log-junit phpunit.results.xml | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results-${{ matrix.php }} | |
path: phpunit.results.xml | |
publish-results: | |
name: Publish Results | |
runs-on: ubuntu-latest | |
needs: run-tests | |
if: always() | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
files: artifacts/**/*.xml |