generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bf0e89
commit e76d3e9
Showing
4 changed files
with
26 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,58 +22,10 @@ on: | |
name: build | ||
|
||
jobs: | ||
tests: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
env: | ||
key: cache-v1 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
|
||
php: | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
ini-values: date.timezone='UTC' | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- name: Determine composer cache directory on Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Determine composer cache directory on Windows | ||
if: matrix.os == 'windows-latest' | ||
run: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Run tests with phpunit | ||
run: vendor/bin/phpunit --colors=always | ||
phpunit: | ||
uses: yiisoft/actions/.github/workflows/phpunit.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest', 'windows-latest'] | ||
php: >- | ||
['7.4', '8.0', '8.1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,49 +21,11 @@ name: mutation test | |
|
||
jobs: | ||
mutation: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php: | ||
- 8.1 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
ini-values: memory_limit=-1 | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Run infection | ||
run: | | ||
vendor/bin/roave-infection-static-analysis-plugin -j2 --ignore-msi-with-no-mutations --only-covered | ||
env: | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
uses: yiisoft/actions/.github/workflows/roave-infection.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] | ||
secrets: | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,48 +22,10 @@ on: | |
name: static analysis | ||
|
||
jobs: | ||
mutation: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php: | ||
- 7.4 | ||
- 8.0 | ||
- 8.1 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2, cs2pr | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Static analysis | ||
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize | ||
psalm: | ||
uses: yiisoft/actions/.github/workflows/psalm.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['7.4', '8.0', '8.1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters