-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
308 additions
and
94 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,33 @@ | ||
name: "Continuous Integration" | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
|
||
tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- operating-system: 'ubuntu-latest' | ||
php-version: '8.2' | ||
- operating-system: 'ubuntu-latest' | ||
php-version: '8.1' | ||
- operating-system: 'ubuntu-latest' | ||
php-version: '8.0' | ||
- operating-system: 'ubuntu-latest' | ||
php-version: '7.4' | ||
|
||
name: PHP ${{ matrix.php-version }} | ||
runs-on: ${{ matrix.operating-system }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: php-actions/composer@v6 | ||
with: | ||
php_version: ${{ matrix.php-version }} | ||
php_extensions: intl | ||
- run: | | ||
./vendor/bin/phpunit -c phpunit.xml.dist \ | ||
--coverage-clover ./coverage.xml |
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,39 @@ | ||
name: "Annotate & Tidy" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "feature/*" | ||
- "release/*" | ||
- "develop" | ||
|
||
jobs: | ||
|
||
tidy: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: php-actions/composer@v6 | ||
with: | ||
php_extensions: xdebug intl | ||
- name: Generate Code Coverage | ||
run: | | ||
XDEBUG_MODE=coverage \ | ||
./vendor/bin/phpunit -c phpunit.xml.dist \ | ||
--coverage-clover ./coverage.xml | ||
- name: Annotate with Metrics | ||
run: | | ||
find src -name "*.php" | xargs ./vendor/bin/metrics annotate ./coverage.xml | ||
- name: Tidy Source Code | ||
run: | | ||
find tests -name "*.php" | xargs ./vendor/bin/phptidy.php replace | ||
find src -name "*.php" | xargs ./vendor/bin/phptidy.php replace | ||
- name: Push Back Changes | ||
run: | | ||
git diff --exit-code src tests || ( \ | ||
git config user.name github-actions && \ | ||
git config user.email github-actions@github.com && \ | ||
git add src && git add tests && \ | ||
git commit -m "tidy" && \ | ||
git push \ | ||
) |
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,20 @@ | ||
name: "Github Autorelease" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
|
||
release: | ||
name: "Create Release" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
|
||
|
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,6 +1,8 @@ | ||
vendor | ||
/app | ||
/vendor | ||
/resources | ||
/assets | ||
composer.lock | ||
resources | ||
run | ||
app | ||
assets | ||
*.cache | ||
*.bak | ||
*~ |
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,9 @@ | ||
<?php | ||
|
||
$add_operator_space = true; | ||
$fix_round_bracket_space = true; | ||
$add_file_docblock = true; | ||
$add_function_docblocks = true; | ||
$add_doctags = true; | ||
$fix_docblock_format = true; | ||
$fix_docblock_space = true; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true"> | ||
<testsuite name="Default"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src/</directory> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<?xml version="1.0"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage includeUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
<report> | ||
<clover outputFile="clover.xml"/> | ||
</report> | ||
</coverage> | ||
<testsuite name="Default"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
<logging/> | ||
<php> | ||
<includePath>app/code</includePath> | ||
<env name="SS_DATABASE_CLASS" value="SQLite3Database"/> | ||
<env name="SS_SQLITE_DATABASE_PATH" value=":memory:"/> | ||
<env name="SS_DATABASE_NAME" value="testing"/> | ||
<env name="SS_DATABASE_USERNAME" value=""/> | ||
<env name="SS_DATABASE_PASSWORD" value=""/> | ||
</php> | ||
</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
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
Oops, something went wrong.