Skip to content

Commit

Permalink
Merge pull request #3 from WebdevCave/feature/tests-coverage
Browse files Browse the repository at this point in the history
Feature/tests coverage
  • Loading branch information
carloscarucce committed Jun 28, 2024
2 parents d938523 + 5d48fb6 commit e53168e
Show file tree
Hide file tree
Showing 11 changed files with 1,967 additions and 1,891 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict
- 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-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run-script test
- name: Run test suite
run: composer run-script test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
.phpunit.cache/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ var_dump($container->get(MyController::class)->save()); //bool(true)
```

## Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements,
please open an issue or a pull request on GitHub.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
11 changes: 9 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"description": "Yet another dependency injection container for PHP",
"type": "library",
"license": "MIT",
"keywords": ["php", "dependency-injection", "autowiring", "repository", "container", "service-container"],
"keywords": [
"php",
"dependency-injection",
"autowiring",
"repository",
"container",
"service-container"
],
"autoload": {
"psr-4": {
"Webdevcave\\Yadic\\": "src/"
Expand Down Expand Up @@ -31,7 +38,7 @@
"phpunit/phpunit": "^10"
},
"scripts": {
"test": "./vendor/bin/phpunit ./tests"
"test": "XDEBUG_MODE=coverage ./vendor/bin/phpunit"
},
"scripts-descriptions": {
"test": "Run PHPUNIT tests"
Expand Down
Loading

0 comments on commit e53168e

Please sign in to comment.