Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f08b369

Browse files
Update infection/infection, update the way env is set
1 parent e8e9ef8 commit f08b369

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ jobs:
5454

5555
- name: Determine composer cache directory on Linux
5656
if: matrix.os == 'ubuntu-latest'
57-
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"
57+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
5858

5959
- name: Determine composer cache directory on Windows
6060
if: matrix.os == 'windows-latest'
61-
run: ECHO "::set-env name=COMPOSER_CACHE_DIR::~\AppData\Local\Composer"
61+
run: ECHO "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6262

6363
- name: Cache dependencies installed with composer
64-
uses: actions/cache@v1
64+
uses: actions/cache@v2
6565
with:
6666
path: ${{ env.COMPOSER_CACHE_DIR }}
6767
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}

.github/workflows/mutation.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ name: mutation test
88

99
jobs:
1010
mutation:
11-
name: PHP ${{ matrix.php}}-${{ matrix.os }}
11+
name: PHP ${{ matrix.php }}-${{ matrix.os }}
1212

1313
env:
14-
extensions: dom, json, libxml, pdo, pdo_sqlite
14+
extensions: pdo, pdo_sqlite
1515

1616
runs-on: ${{ matrix.os }}
1717

@@ -37,23 +37,22 @@ jobs:
3737
tools: composer:v2
3838

3939
- name: Determine composer cache directory
40-
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"
40+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
4141

4242
- name: Cache dependencies installed with composer
4343
uses: actions/cache@v2
4444
with:
4545
path: ${{ env.COMPOSER_CACHE_DIR }}
46-
key: php${{ matrix.php}}-composer-${{ hashFiles('**/composer.json') }}
46+
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
4747
restore-keys: |
48-
php${{ matrix.php}}-composer-
48+
php${{ matrix.php }}-composer-
4949
5050
- name: Install dependencies with composer
5151
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
5252

53-
- name: Run test mutation infection with coverage
53+
- name: Run infection
5454
run: |
55-
mkdir -p build/logs
56-
vendor/bin/phpunit --coverage-xml=build/logs/coverage-xml --log-junit=build/logs/junit.xml --colors=always
57-
vendor/bin/infection --threads=2 --coverage=build/logs --show-mutations --no-progress
55+
git fetch --depth=1 origin $GITHUB_BASE_REF
56+
vendor/bin/infection -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
5857
env:
5958
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/static.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
coverage: none
3535

3636
- name: Determine composer cache directory
37-
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"
37+
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
3838

3939
- name: Cache dependencies installed with composer
40-
uses: actions/cache@v1
40+
uses: actions/cache@v2
4141
with:
4242
path: ${{ env.COMPOSER_CACHE_DIR }}
4343
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"yiisoft/strings": "^1.0"
2727
},
2828
"require-dev": {
29-
"infection/infection": "^0.18.0",
29+
"infection/infection": "^0.20.0",
3030
"phpunit/phpunit": "^9.3",
3131
"vimeo/psalm": "^4.0",
3232
"yiisoft/aliases": "^1.0",

0 commit comments

Comments
 (0)