Skip to content

Commit 6b339f0

Browse files
Fix minor corrections. (#57)
1 parent ace5c00 commit 6b339f0

File tree

5 files changed

+70
-30
lines changed

5 files changed

+70
-30
lines changed

.github/workflows/bc.yml_

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
- pull_request
3+
- push
4+
5+
name: backwards compatibility
6+
jobs:
7+
roave_bc_check:
8+
name: Roave BC Check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: fetch tags
13+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
14+
- name: Roave BC Check
15+
uses: docker://nyholm/roave-bc-check-ga

.github/workflows/build.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ name: build
77
jobs:
88
tests:
99
name: PHP ${{ matrix.php }}-${{ matrix.os }}
10+
1011
env:
11-
extensions: mbstring
1212
key: cache-v1
1313

1414
runs-on: ${{ matrix.os }}
@@ -27,26 +27,10 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@v2.3.4
2929

30-
- name: Setup cache environment
31-
id: cache-env
32-
uses: shivammathur/cache-extensions@v1
33-
with:
34-
php-version: ${{ matrix.php }}
35-
extensions: ${{ env.extensions }}
36-
key: ${{ env.key }}
37-
38-
- name: Cache extensions
39-
uses: actions/cache@v1
40-
with:
41-
path: ${{ steps.cache-env.outputs.dir }}
42-
key: ${{ steps.cache-env.outputs.key }}
43-
restore-keys: ${{ steps.cache-env.outputs.key }}
44-
45-
- name: Install PHP with extensions
30+
- name: Install PHP
4631
uses: shivammathur/setup-php@v2
4732
with:
4833
php-version: ${{ matrix.php }}
49-
extensions: ${{ env.extensions }}
5034
ini-values: date.timezone='UTC'
5135
coverage: pcov
5236
tools: composer:v2
@@ -67,6 +51,9 @@ jobs:
6751
restore-keys: |
6852
php${{ matrix.php }}-composer-
6953
54+
- name: Update composer
55+
run: composer self-update
56+
7057
- name: Install dependencies with composer php 7.4
7158
if: matrix.php == '7.4'
7259
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
@@ -75,16 +62,5 @@ jobs:
7562
if: matrix.php == '8.0'
7663
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
7764

78-
- name: Run tests with phpunit and coverage on Linux php 7.4
79-
if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4'
80-
run: vendor/bin/phpunit --coverage-clover=coverage.clover --colors=always
81-
82-
- name: Run tests with phpunit without coverage
83-
if: matrix.os != 'ubuntu-latest' || matrix.php != '7.4'
65+
- name: Run tests with phpunit
8466
run: vendor/bin/phpunit --colors=always
85-
86-
- name: Upload code coverage scrutinizer on Linux php 7.4
87-
if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4'
88-
run: |
89-
wget https://scrutinizer-ci.com/ocular.phar
90-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover

.github/workflows/mutation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
restore-keys: |
4444
php${{ matrix.php }}-composer-
4545
46+
- name: Update composer
47+
run: composer self-update
48+
4649
- name: Install dependencies with composer
4750
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4851

.github/workflows/static.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
restore-keys: |
4141
php${{ matrix.php }}-composer-
4242
43+
- name: Update composer
44+
run: composer self-update
45+
4346
- name: Install dependencies with composer
4447
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4548

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,46 @@ if ($startsWithTest->match($fileName)) {
176176
echo 'It is a config!';
177177
}
178178
```
179+
180+
### Unit testing
181+
182+
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
183+
184+
```shell
185+
./vendor/bin/phpunit
186+
```
187+
188+
### Mutation testing
189+
190+
The package tests are checked with [Infection](https://infection.github.io/) mutation framework. To run it:
191+
192+
```shell
193+
./vendor/bin/infection
194+
```
195+
196+
### Static analysis
197+
198+
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
199+
200+
```shell
201+
./vendor/bin/psalm
202+
```
203+
204+
### Support the project
205+
206+
[![Open Collective](https://img.shields.io/badge/Open%20Collective-sponsor-7eadf1?logo=open%20collective&logoColor=7eadf1&labelColor=555555)](https://opencollective.com/yiisoft)
207+
208+
### Follow updates
209+
210+
[![Official website](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](https://www.yiiframework.com/)
211+
[![Twitter](https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter&logoColor=1DA1F2&labelColor=555555?style=flat)](https://twitter.com/yiiframework)
212+
[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en)
213+
[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)
214+
[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat&logo=slack)](https://yiiframework.com/go/slack)
215+
216+
## License
217+
218+
The Yii Strings is free software. It is released under the terms of the BSD License.
219+
Please see [`LICENSE`](./LICENSE.md) for more information.
220+
221+
Maintained by [Yii Software](https://www.yiiframework.com/).

0 commit comments

Comments
 (0)