Minor fix to tests config #157
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: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
phpUnitTests: | |
strategy: | |
matrix: | |
operatingSystem: [ubuntu-latest] | |
phpVersion: ['8.0', '8.1', '8.2', '8.3'] | |
winterBranch: ['develop'] | |
include: | |
- operatingSystem: ubuntu-latest | |
phpVersion: '7.4' | |
winterBranch: '1.1' | |
fail-fast: false | |
name: PHP ${{ matrix.phpVersion }} / Winter ${{ matrix.winterBranch }} | |
runs-on: ${{ matrix.operatingSystem }} | |
env: | |
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip | |
steps: | |
- name: Checkout Winter CMS | |
uses: actions/checkout@v4 | |
with: | |
repository: wintercms/winter | |
ref: ${{ matrix.winterBranch }} | |
- name: Checkout changes | |
uses: actions/checkout@v2 | |
with: | |
path: plugins/winter/user | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.phpVersion }} | |
tools: composer:v2 | |
extensions: ${{ env.extensions }} | |
- name: Install Composer dependencies | |
run: composer install --no-interaction --no-progress --no-scripts | |
- name: Run linting | |
run: ./vendor/bin/parallel-lint plugins/winter/user | |
- name: Run unit tests (develop branch) | |
if: matrix.winterBranch != '1.1' | |
run: php artisan winter:test -p Winter.User -- --testdox | |
- name: Run unit tests (1.1 branch) | |
if: matrix.winterBranch == '1.1' | |
working-directory: plugins/winter/user | |
run: ../../../vendor/bin/phpunit --bootstrap ../../../tests/bootstrap.php --testdox |