Luke Towers c047f34156 Merge branch 'wip/rebrand-1.0' into wip/rebrand-develop
# Conflicts:
#	.github/workflows/code-quality-pr.yaml
#	.github/workflows/code-quality-push.yaml
#	.github/workflows/tests.yml
#	README.md
#	composer.json
#	modules/backend/behaviors/ImportExportController.php
#	modules/backend/behaviors/ReorderController.php
#	modules/backend/composer.json
#	modules/backend/models/ExportModel.php
#	modules/cms/ServiceProvider.php
#	modules/cms/classes/Asset.php
#	modules/cms/classes/CmsObject.php
#	modules/cms/classes/CmsObjectCollection.php
#	modules/cms/composer.json
#	modules/system/ServiceProvider.php
#	modules/system/aliases.php
#	modules/system/assets/js/lang/lang.es.js
#	modules/system/assets/js/lang/lang.it.js
#	modules/system/assets/js/lang/lang.zh-tw.js
#	modules/system/assets/ui/storm-min.js
#	modules/system/classes/CombineAssets.php
#	modules/system/classes/ErrorHandler.php
#	modules/system/classes/SystemController.php
#	modules/system/classes/UpdateManager.php
#	modules/system/composer.json
#	modules/system/console/WinterFresh.php
#	modules/system/console/WinterUtil.php
#	modules/system/controllers/updates/_list_toolbar.htm
#	modules/system/providers.php
#	tests/UiTestCase.php
#	tests/functional/backend/AuthTest.php
#	tests/functional/phpunit.xml
#	tests/unit/backend/classes/NavigationManagerTest.php
#	tests/unit/cms/classes/CmsObjectTest.php
#	tests/unit/cms/classes/ControllerTest.php
#	tests/unit/cms/classes/ThemeTest.php
#	tests/unit/plugins/database/PluginModelTest.php
#	tests/unit/plugins/database/ValidationModelTest.php
#	tests/unit/system/console/WinterEnvTest.php
2021-03-11 00:22:09 -06:00

106 lines
3.1 KiB
YAML

name: Tests
on:
push:
branches:
- '1.0'
- '1.1'
- develop
pull_request:
jobs:
frontendTests:
runs-on: ubuntu-latest
name: JavaScript
steps:
- name: Checkout changes
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Node dependencies
run: npm install
- name: Run tests
run: npm run test
phpUnitTests:
strategy:
max-parallel: 8
matrix:
operatingSystem: [ubuntu-latest, windows-latest]
phpVersion: ['7.2', '7.3', '7.4', '8.0']
fail-fast: false
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-cms-cache-develop
steps:
- name: Cancel previous incomplete runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- name: Checkout changes
uses: actions/checkout@v2
- 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 }}
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-scripts
- name: Reset Winter modules and library
run: |
git reset --hard HEAD
rm -rf ./vendor/winter/storm
wget https://github.com/wintercms/storm/archive/develop.zip -O ./vendor/winter/develop.zip
unzip ./vendor/winter/winter.zip -d ./vendor/winter
mv ./vendor/winter/storm-develop ./vendor/winter/storm
composer dump-autoload
- name: Run post-update Composer scripts
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 .
./vendor/bin/phpunit