-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make plugin ready for Laravel 6 update (#600)
Make slug parameters optional in routes
- Loading branch information
Ben Thomson
authored
Oct 2, 2020
1 parent
d5a2401
commit f6e5450
Showing
7 changed files
with
109 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
phpUnitTests: | ||
runs-on: ubuntu-latest | ||
name: Unit Tests / PHP ${{ matrix.phpVersions }} | ||
strategy: | ||
max-parallel: 6 | ||
matrix: | ||
phpVersions: ['7.2', '7.3', '7.4'] | ||
fail-fast: false | ||
env: | ||
phpExtensions: mbstring, intl, gd, xml, sqlite | ||
cacheKey: ext-cache-v1 | ||
octoberCmsRelease: develop | ||
steps: | ||
- name: Checkout changes | ||
uses: actions/checkout@v2 | ||
with: | ||
path: translate-plugin | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.phpVersions }} | ||
extensions: ${{ env.phpExtensions }} | ||
key: ${{ env.cacheKey }} | ||
|
||
- 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 and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.phpVersions }} | ||
extensions: ${{ env.phpExtensions }} | ||
tools: composer | ||
coverage: none | ||
|
||
- name: Install October CMS | ||
run: | | ||
wget https://github.com/octobercms/october/archive/${{ env.octoberCmsRelease }}.zip | ||
unzip ${{ env.octoberCmsRelease }}.zip | ||
shopt -s dotglob | ||
mv october-${{ env.octoberCmsRelease }}/* ./ | ||
shopt -u dotglob | ||
cp config/cms.php config/testing/cms.php | ||
mkdir -p plugins/rainlab | ||
mv translate-plugin plugins/rainlab/translate | ||
- name: Get Composer cache directory | ||
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 | ||
|
||
- name: Run linting | ||
run: ./vendor/bin/parallel-lint plugins/rainlab/translate | ||
|
||
- name: Run unit tests | ||
run: | | ||
cd plugins/rainlab/translate | ||
../../../vendor/bin/phpunit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/vendor | ||
composer.lock | ||
.DS_Store | ||
.phpunit.result.cache |
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
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
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
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
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