Don't nest AutoDatasources inside of other AutoDatasources. #30
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: | |
jobs: | |
phpUnitTests: | |
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }} | |
runs-on: ${{ matrix.operatingSystem }} | |
strategy: | |
max-parallel: 4 | |
matrix: | |
operatingSystem: [ubuntu-latest, windows-latest] | |
phpVersion: ['8.0', '8.1', '8.2'] | |
fail-fast: false | |
env: | |
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip | |
key: winter-blocks-cache-v1 | |
steps: | |
- name: Cancel previous incomplete runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout Winter CMS | |
uses: actions/checkout@v2 | |
with: | |
repository: wintercms/winter | |
ref: develop | |
- name: Checkout plugin | |
uses: actions/checkout@v2 | |
with: | |
path: plugins/winter/blocks | |
- name: Setup extension cache | |
id: extcache | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.phpVersion }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.extcache.outputs.dir }} | |
key: ${{ steps.extcache.outputs.key }} | |
restore-keys: ${{ steps.extcache.outputs.key }} | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.phpVersion }} | |
tools: composer:v2 | |
extensions: ${{ env.extensions }} | |
coverage: xdebug | |
- name: Setup dependency cache | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: composer install --no-interaction --no-progress --no-scripts | |
- name: Setup problem matchers for PHPUnit | |
if: matrix.phpVersion == '8.1' | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Run tests | |
if: matrix.phpVersion != '8.1' || matrix.operatingSystem != 'ubuntu-latest' | |
run: php artisan winter:test -p Winter.Blocks -- --testdox | |
- name: Run tests (and generate coverage report) | |
if: matrix.phpVersion == '8.1' && matrix.operatingSystem == 'ubuntu-latest' | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
XDEBUG_MODE=coverage php artisan winter:test -p Winter.Blocks -- --testdox --coverage-clover coverage.xml | |
bash <(curl -s https://codecov.io/bash) |