diff --git a/.github/workflows/ci-workflow.yaml b/.github/workflows/ci-workflow.yaml new file mode 100644 index 0000000..5d5630b --- /dev/null +++ b/.github/workflows/ci-workflow.yaml @@ -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 diff --git a/README.md b/README.md index 53c479c..9b2670f 100644 --- a/README.md +++ b/README.md @@ -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?