-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from dolejska-daniel/v2.0.0
PHP8.1 Update, GitHub Actions, minor refactors and code cleanup
- Loading branch information
Showing
25 changed files
with
421 additions
and
391 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,54 @@ | ||
name: PHP Composer | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Run tests on PHP ${{ matrix.php_version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php_version: | ||
- 8.1 | ||
- 8.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php${{ matrix.php_version }}- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: PHPUnit Tests | ||
uses: php-actions/phpunit@v3 | ||
env: | ||
XDEBUG_MODE: coverage | ||
with: | ||
configuration: phpunit.xml | ||
php_extensions: xdebug memcached | ||
args: tests --coverage-clover ./coverage.xml | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
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,11 +1,117 @@ | ||
.idea/ | ||
|
||
# Composer files | ||
vendor/ | ||
# Created by https://www.toptal.com/developers/gitignore/api/composer,phpunit,phpstorm+all | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=composer,phpunit,phpstorm+all | ||
|
||
### Composer ### | ||
composer.phar | ||
phpunit.phar | ||
/vendor/ | ||
|
||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
composer.lock | ||
|
||
# Cache | ||
src/Base/cache/ | ||
build | ||
### PhpStorm+all ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
|
||
# AWS User-specific | ||
.idea/**/aws.xml | ||
|
||
# Generated files | ||
.idea/**/contentModel.xml | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# Gradle and Maven with auto-import | ||
# When using Gradle or Maven with auto-import, you should exclude module files, | ||
# since they will be recreated, and may cause churn. Uncomment if using | ||
# auto-import. | ||
# .idea/artifacts | ||
# .idea/compiler.xml | ||
# .idea/jarRepositories.xml | ||
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
# *.iml | ||
# *.ipr | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# SonarLint plugin | ||
.idea/sonarlint/ | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
||
# Android studio 3.1+ serialized cache file | ||
.idea/caches/build_file_checksums.ser | ||
|
||
### PhpStorm+all Patch ### | ||
# Ignore everything but code style settings and run configurations | ||
# that are supposed to be shared within teams. | ||
|
||
.idea/* | ||
|
||
!.idea/codeStyles | ||
!.idea/runConfigurations | ||
|
||
### PHPUnit ### | ||
# Covers PHPUnit | ||
# Reference: https://phpunit.de/ | ||
|
||
# Generated files | ||
.phpunit.result.cache | ||
.phpunit.cache | ||
|
||
# PHPUnit | ||
/app/phpunit.xml | ||
/phpunit.xml | ||
|
||
# Build data | ||
/build/ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/composer,phpunit,phpstorm+all |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="phpunit.php" | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
cacheDirectory=".phpunit.cache" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
beStrictAboutOutputDuringTests="true" | ||
> | ||
<testsuites> | ||
<testsuite name="BaseAPI:Library_Tests"> | ||
<directory>tests/Base/Library/</directory> | ||
</testsuite> | ||
<testsuite name="BaseAPI:Definition_Tests"> | ||
<directory>tests/Base/Definitions/</directory> | ||
</testsuite> | ||
<!-- | ||
<testsuite name="BaseAPI:Object_Tests"> | ||
<directory>tests/Base/Objects/</directory> | ||
</testsuite> | ||
--> | ||
</testsuites> | ||
|
||
<coverage cacheDirectory="build/cache/phpunit_coverage" | ||
includeUncoveredFiles="true" | ||
processUncoveredFiles="true" | ||
pathCoverage="false" | ||
ignoreDeprecatedCodeUnits="true" | ||
disableCodeCoverageIgnore="true" | ||
> | ||
<include> | ||
<directory suffix=".php">src/Base</directory> | ||
</include> | ||
|
||
<exclude> | ||
<directory suffix=".php">vendor</directory> | ||
</exclude> | ||
</coverage> | ||
</phpunit> | ||
<testsuites> | ||
<testsuite name="BaseAPI:Library_Tests"> | ||
<directory>tests/Base/Library/</directory> | ||
</testsuite> | ||
<testsuite name="BaseAPI:Definition_Tests"> | ||
<directory>tests/Base/Definitions/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<coverage ignoreDeprecatedCodeUnits="true" | ||
disableCodeCoverageIgnore="true" | ||
/> | ||
<source> | ||
<include> | ||
<directory>src/Base</directory> | ||
</include> | ||
<exclude> | ||
<directory>vendor</directory> | ||
</exclude> | ||
</source> | ||
</phpunit> |
Oops, something went wrong.