Merge pull request #6859 from scottcwilson/version-stamping-v210 #148
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: Zen Cart Unit Tests | |
on: [push, pull_request] | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4'] | |
continue-on-error: ${{ matrix.php-version == '8.4' }} | |
name: PHP ${{ matrix.php-version }} Unit Tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: composer, phpunit | |
- name: Backward Compatibility | |
if: matrix.php-version == '8.0' | |
run: | | |
rm composer.lock | |
composer require symfony/polyfill-php81 | |
- name: Install Composer dependencies | |
run: composer install --no-progress --no-interaction --ignore-platform-reqs --prefer-dist --optimize-autoloader --no-ansi --no-scripts | |
- name: Patch composer files for PHP 8.4 compatibility | |
run: sh not_for_release/testFramework/copyVendorFiles.sh | |
- name: Prepare the application | |
run: | | |
touch includes/configure.php | |
- name: Run UnitTests suite | |
run: php vendor/bin/phpunit --verbose --process-isolation --testsuite=Unit --debug | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: artifacts-${{ matrix.php-version }} | |
path: not_for_release/testFramework/logs/console | |
if-no-files-found: ignore | |
retention-days: 90 |