Skip to content

Commit

Permalink
Add Github Action pipeline with phpunit autotests
Browse files Browse the repository at this point in the history
  • Loading branch information
renakdup committed Nov 28, 2023
1 parent 0312513 commit f6c3f53
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Main CI flow

env:
PHP_VER: "7.4"
COMPOSER_VER: "2.1"

on:
push:
branches: [ "main" ]
pull_request:
types: [ synchronize, opened, reopened ]

jobs:
php-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup PHP with Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VER }}
tools: composer:v${{ env.COMPOSER_VER }}

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- name: Run Composer
run: |
export COMPOSER_CACHE_DIR=/tmp/composer-cache # change cache directory to be able to use cache of php-actions/composer@v6 jobs
composer install
- name: Run PHPUnit
run: composer run phpunit
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,13 @@ $container->set('config.', ['one', 'two, 'three']);
- [x] Add PSR11 interfaces in the Container.php.
- [x] Add auto-wiring support for not bounded classes.
- [x] Add resolved service storage.
- [ ] Think about this exception ContainerNotFoundException
- [ ] Integrate CI with running autotests
- [ ] Add ability creating new instance of service every time
- [ ] Add supporting Code Driven IoC
- [ ] Add singleton getting for Container
- [ ] Add descriptions in the code for functions.
- [ ] Set definitions via constuctor
- [ ] Add `remove` method?
- [ ] Integrate CI
- [ ] Add badges with tests passed
- [ ] PHP 8 named arguments and autowiring
- [ ] Save cache in opcache?
Expand Down

0 comments on commit f6c3f53

Please sign in to comment.