Skip to content

Commit

Permalink
Fix manual injection value (#17)
Browse files Browse the repository at this point in the history
* Change how values are passed with DI

* Fixes #16

* Fix tests
  • Loading branch information
gigili authored Sep 29, 2022
1 parent a2d1cdb commit 97a424e
Show file tree
Hide file tree
Showing 16 changed files with 4,612 additions and 4,595 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
name: Automatically update project documentation

on:
push:
branches:
- main
env:
extensions: 'json,mbstring'
defaultPHPVersion: '8.1.10'

jobs:
generate_docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ env.defaultPHPVersion }}
extensions: ${{ env.extensions }}
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
tools: pecl

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.lock') }}

- name: Install Composer dependencies
run: composer install -q --no-ansi --no-interaction --no-progress --prefer-dist --optimize-autoloader

- name: Generate Documentation
run: |
git config --global user.email "${{ secrets.DOCS_GITHUB_EMAIL }}"
git config --global user.name "${{ secrets.DOCS_GITHUB_USER }}"
git remote set-url origin https://gigili:${{ secrets.WIKI_GITHUB_UPDATE_TOKEN }}@github.com/gigili/PHP-routing.git
mkdir bin
cd bin/
wget https://phpdoc.org/phpDocumentor.phar
cd ..
mkdir -p ./docs
php bin/phpDocumentor.phar run -d ./ -t ./docs --ignore vendor/ --ignore sample/ --ignore tests/ --setting="guides.enabled=true" --force -v
rm -r bin/
git add .
if [[ $(git commit -am "[AUTO] Update documentation") != *"Nothing to commit"* ]]; then
echo "::debug::Pushing new documentation changes"
git push origin main
else
echo "::debug::Nothing to commit and skipping push"
name: Automatically update project documentation

on:
push:
branches:
- main
env:
extensions: 'json,mbstring'
defaultPHPVersion: '8.1.10'

jobs:
generate_docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ env.defaultPHPVersion }}
extensions: ${{ env.extensions }}
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
tools: pecl

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.lock') }}

- name: Install Composer dependencies
run: composer install -q --no-ansi --no-interaction --no-progress --prefer-dist --optimize-autoloader

- name: Generate Documentation
run: |
git config --global user.email "${{ secrets.DOCS_GITHUB_EMAIL }}"
git config --global user.name "${{ secrets.DOCS_GITHUB_USER }}"
git remote set-url origin https://gigili:${{ secrets.WIKI_GITHUB_UPDATE_TOKEN }}@github.com/gigili/PHP-routing.git
mkdir bin
cd bin/
wget https://phpdoc.org/phpDocumentor.phar
cd ..
mkdir -p ./docs
php bin/phpDocumentor.phar run -d ./ -t ./docs --ignore vendor/ --ignore sample/ --ignore tests/ --setting="guides.enabled=true" --force -v
rm -r bin/
git add .
if [[ $(git commit -am "[AUTO] Update documentation") != *"Nothing to commit"* ]]; then
echo "::debug::Pushing new documentation changes"
git push origin main
else
echo "::debug::Nothing to commit and skipping push"
fi
62 changes: 31 additions & 31 deletions .github/workflows/php-pest-tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: PHP Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: xdebug

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.lock') }}

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-progress --prefer-dist --optimize-autoloader

- name: Execute tests
name: PHP Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: xdebug

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.lock') }}

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-progress --prefer-dist --optimize-autoloader

- name: Execute tests
run: vendor/bin/pest
Loading

0 comments on commit 97a424e

Please sign in to comment.