Skip to content

Commit

Permalink
Upload Scrutinizer coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lav45 committed Nov 23, 2024
1 parent 24a14c9 commit cd28b4e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,23 @@ jobs:
matrix:
include:
- php: 7.3
extensions: apc, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
- php: 7.4
extensions: apc, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
- php: 8.0
extensions: apcu, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
- php: 8.1
extensions: apcu, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
- php: 8.2
extensions: apcu, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
- php: 8.3
extensions: apcu, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
- php: 8.4
extensions: apcu, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv

steps:
- name: Checkout.
uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Install PHP.
uses: shivammathur/setup-php@v2
with:
extensions:
extensions: opcache, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
ini-values: apc.enabled=1, apc.shm_size=32M, apc.enable_cli=1
php-version: ${{ matrix.php }}

Expand All @@ -52,4 +47,15 @@ jobs:
run: composer update $DEFAULT_COMPOSER_FLAGS --ignore-platform-reqs

- name: Run tests with PHPUnit.
if: matrix.php != '7.4'
run: vendor/bin/phpunit --verbose --colors=always

- name: Run tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --verbose --colors=always --coverage-clover=coverage.xml

- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
if: github.repository == 'lav45/yii2-settings' && matrix.php == '7.4'
with:
cli-args: "--format=php-clover coverage.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,16 @@ The preferred way to install this extension through [composer](http://getcompose

You can set the console

```
```shell
~$ composer require lav45/yii2-settings
```

or add

```
"lav45/yii2-settings": "1.3.*"
```

in ```require``` section in `composer.json` file.

### Migrate

Apply with the console command:

```
~$ yii migrate/up --migrationPath=vendor/lav45/yii2-settings/migrations
```
Expand Down Expand Up @@ -122,7 +117,7 @@ return [

## Using

### Can default
### Can default

```php
$settings = Yii::$app->settings;
Expand Down Expand Up @@ -174,6 +169,7 @@ The extension, which will help to speed up data loading by caching.
If the data changes, the cache will be updated automatically.

To clean the cache, you can use this method

```php
Yii::$app->settings->cache->flush(); // => true
```
Expand Down

0 comments on commit cd28b4e

Please sign in to comment.