Fix testing structure for 1.0

This commit is contained in:
Ben Thomson 2021-03-08 17:24:29 +08:00
parent 2ea05585d5
commit 1c7da5b51a
No known key found for this signature in database
GPG Key ID: 8BDB18DD0909BE22

View File

@ -14,18 +14,50 @@ jobs:
matrix:
phpVersions: ['7.1', '7.2', '7.3', '7.4']
fail-fast: false
name: PHP ${{ matrix.phpVersions }}
name: Linux / PHP ${{ matrix.phpVersions }}
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml
key: october-cms-1-0-cache-v1
steps:
- name: Checkout changes
uses: actions/checkout@v1
- name: Install PHP
uses: shivammathur/setup-php@master
uses: actions/checkout@v2
- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.phpVersions }}
extension-csv: mbstring, intl, gd, xml, sqlite, zip
tools: composer:v1
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 }}
- 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-suggest --no-scripts
run: composer install --no-interaction --no-progress --no-scripts
- name: Reset Winter modules and library
run: |
git reset --hard HEAD
@ -34,10 +66,14 @@ jobs:
unzip ./vendor/winter/1.0.zip -d ./vendor/winter
mv ./vendor/winter/storm-1.0 ./vendor/winter/storm
composer dump-autoload
- name: Run post-update Composer scripts
run: |
php artisan winter:util set build
php artisan package:discover
run: php artisan package:discover
- name: Setup problem matchers for PHPUnit
if: matrix.phpVersion == '7.4'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run Linting and Tests
run: |
./vendor/bin/parallel-lint --exclude vendor --exclude storage --exclude tests/fixtures/plugins/testvendor/goto/Plugin.php .