-
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
89 changed files
with
1,559 additions
and
425 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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
.github export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.php_cs.dist export-ignore | ||
.travis.yml export-ignore | ||
.scrutinizer.yml export-ignore | ||
.php-cs-fixer.dist.php export-ignore | ||
docker-compose.yml export-ignore | ||
Dockerfile export-ignore | ||
Makefile export-ignore | ||
phpstan.neon export-ignore | ||
tests export-ignore | ||
vendor-bin export-ignore |
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,50 @@ | ||
name: Coding style | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
php-cs-fixer: | ||
name: Php-Cs-Fixer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet | ||
|
||
- name: Php-Cs-Fixer | ||
run: vendor/bin/php-cs-fixer fix -v --dry-run | ||
|
||
php-stan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet | ||
|
||
- name: PhpStan | ||
run: vendor/bin/phpstan analyse |
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,42 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
coverage: | ||
name: Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
extensions: tokenizer | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet | ||
composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet --working-dir=vendor-bin/nettrine | ||
- name: Generate the coverage report | ||
run: vendor/bin/tester -p phpdbg -C -s --coverage ./coverage.xml --coverage-src ./src ./tests | ||
|
||
- name: Upload the coverage report | ||
env: | ||
COVERALLS_REPO_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
run: | | ||
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.3/php-coveralls.phar | ||
php php-coveralls.phar --verbose --config tests/.coveralls.yml |
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,44 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
name: Unit Tests [PHP ${{ matrix.php-versions }}] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['8.1', '8.2'] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: composer:v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet | ||
composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet --working-dir=vendor-bin/nettrine | ||
- name: Run tests | ||
run: vendor/bin/tester -C -s ./tests | ||
|
||
- name: Install dependencies (lowest) | ||
run: | | ||
composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable --optimize-autoloader --quiet | ||
composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable --optimize-autoloader --quiet --working-dir=vendor-bin/nettrine | ||
- name: Run tests | ||
run: vendor/bin/tester -C -s ./tests |
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 @@ | ||
/.idea | ||
composer.lock | ||
vendor | ||
coverage.xml | ||
/vendor | ||
/.idea |
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 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM php:8.1.12-cli-alpine3.16 AS php81 | ||
|
||
CMD ["/bin/sh"] | ||
WORKDIR /var/www/html | ||
|
||
RUN apk add --no-cache --update git | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
CMD tail -f /dev/null | ||
|
||
FROM php:8.2.0RC6-cli-alpine3.16 AS php82 | ||
|
||
CMD ["/bin/sh"] | ||
WORKDIR /var/www/html | ||
|
||
RUN apk add --no-cache --update git | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
CMD tail -f /dev/null |
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,61 @@ | ||
init: | ||
make stop | ||
make start | ||
|
||
stop: | ||
docker compose stop | ||
|
||
start: | ||
docker compose up -d | ||
|
||
down: | ||
docker compose down | ||
|
||
restart: | ||
make stop | ||
make start | ||
|
||
tests.all: | ||
PHP=81 make tests.run | ||
PHP=82 make tests.run | ||
|
||
cs.fix: | ||
PHP=81 make composer.update | ||
docker exec 68publishers.doctrine-bridge.81 vendor/bin/php-cs-fixer fix -v | ||
|
||
cs.check: | ||
PHP=81 make composer.update | ||
docker exec 68publishers.doctrine-bridge.81 vendor/bin/php-cs-fixer fix -v --dry-run | ||
|
||
stan: | ||
PHP=81 make composer.update | ||
docker exec 68publishers.doctrine-bridge.81 vendor/bin/phpstan analyse | ||
|
||
coverage: | ||
PHP=81 make composer.update | ||
docker exec 68publishers.doctrine-bridge.81 vendor/bin/tester -p phpdbg -C -s --coverage ./coverage.xml --coverage-src ./src ./tests | ||
|
||
composer.update: | ||
ifndef PHP | ||
$(error "PHP argument not set.") | ||
endif | ||
@echo "========== Installing dependencies with PHP $(PHP) ==========" >&2 | ||
docker exec 68publishers.doctrine-bridge.$(PHP) composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader --quiet | ||
|
||
composer.update-lowest: | ||
ifndef PHP | ||
$(error "PHP argument not set.") | ||
endif | ||
@echo "========== Installing dependencies with PHP $(PHP) (prefer lowest dependencies) ==========" >&2 | ||
docker exec 68publishers.doctrine-bridge.$(PHP) composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable --optimize-autoloader --quiet | ||
|
||
tests.run: | ||
ifndef PHP | ||
$(error "PHP argument not set.") | ||
endif | ||
PHP=$(PHP) make composer.update | ||
@echo "========== Running tests with PHP $(PHP) ==========" >&2 | ||
docker exec 68publishers.doctrine-bridge.$(PHP) vendor/bin/tester -C -s ./tests | ||
PHP=$(PHP) make composer.update-lowest | ||
@echo "========== Running tests with PHP $(PHP) (prefer lowest dependencies) ==========" >&2 | ||
docker exec 68publishers.doctrine-bridge.$(PHP) vendor/bin/tester -C -s ./tests |
Oops, something went wrong.