Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Adjust github actions (#258)
Browse files Browse the repository at this point in the history
* Remove mutation testing.
* Add dependabot.
  • Loading branch information
terabytesoftw authored and devanych committed Feb 1, 2021
1 parent c823c63 commit 3c91d71
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 78 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ name: build
jobs:
tests:
name: PHP ${{ matrix.php-version }}-${{ matrix.os }}

env:
extensions: curl, mbstring, dom, intl, json, libxml, xml, xmlwriter
key: cache-v1
update: true

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

Expand All @@ -29,14 +31,14 @@ jobs:

- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@v1
uses: shivammathur/cache-extensions@1.1.0
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
Expand All @@ -49,6 +51,7 @@ jobs:
extensions: ${{ env.extensions }}
ini-values: date.timezone='UTC'
coverage: pcov
tools: composer:v2

- name: Determine composer cache directory on Linux
if: matrix.os == 'ubuntu-latest'
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/mutation.yml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ on:
- pull_request
- push

name: static analysis with phan
name: static analysis

jobs:
mutation:
name: PHP ${{ matrix.php-version }}-${{ matrix.os }}

env:
extensions: ast
update: true

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

strategy:
Expand All @@ -26,14 +30,15 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: cs2pr, phan
extensions: ${{ env.extensions }}
tools: composer:v2, cs2pr
coverage: none

- name: Determine composer cache directory
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"

- name: Cache dependencies installed with composer
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -44,4 +49,4 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader

- name: Static analysis with phan
run: phan --no-progress-bar --output-mode checkstyle | cs2pr --graceful-warnings --colorize
run: vendor/bin/phan --no-progress-bar --output-mode checkstyle | cs2pr --graceful-warnings --colorize
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="http://www.yiiframework.com/" target="_blank">
<img src="https://www.yiiframework.com/files/logo/yii.png" width="400" alt="Yii Framework" />
<a href="https://github.com/yiisoft" target="_blank">
<img src="https://avatars0.githubusercontent.com/u/993323" height="100px">
</a>
<h1 align="center">Yii Framework Web Extension</h1>
<br>
Expand All @@ -14,10 +14,12 @@ This [Yii Framework] extension allows easy creation of web applications.

[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii-web/v/stable.png)](https://packagist.org/packages/yiisoft/yii-web)
[![Total Downloads](https://poser.pugx.org/yiisoft/yii-web/downloads.png)](https://packagist.org/packages/yiisoft/yii-web)
[![Build Status](https://github.com/yiisoft/yii-web/workflows/build/badge.svg)](https://github.com/yiisoft/yii-web/actions)
[![Build Status](https://github.com/yiisoft/yii-web/workflows/build/badge.svg)](https://github.com/yiisoft/yii-web/actions?query=workflow%3Abuild)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/yiisoft/yii-web/badges/quality-score.png?s=b1074a1ff6d0b214d54fa5ab7abbb90fc092471d)](https://scrutinizer-ci.com/g/yiisoft/yii-web/)
[![Code Coverage](https://scrutinizer-ci.com/g/yiisoft/yii-web/badges/coverage.png?s=31d80f1036099e9d6a3e4d7738f6b000b3c3d10e)](https://scrutinizer-ci.com/g/yiisoft/yii-web/)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyiisoft%2Fyii-web%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/yiisoft/yii-web/master)
[![static analysis](https://github.com/yiisoft/yii-web/workflows/static%20analysis/badge.svg)](https://github.com/yiisoft/yii-web/actions?query=workflow%3A%22static+analysis%22)


Installation
------------
Expand Down Expand Up @@ -89,3 +91,27 @@ If your code is hosted at GitHub, you can place the following in your README.md
```
[![Yii](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](http://www.yiiframework.com/)
```

### Unit testing

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

```php
./vendor/bin/phpunit
```

### Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework. To run it:

```php
./vendor/bin/infection
```

### Static analysis

The code is statically analyzed with [Phan](https://github.com/phan/phan/wiki). To run static analysis:

```php
./vendor/bin/phan
```
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"yiisoft/event-dispatcher": "^3.0@dev"
},
"require-dev": {
"infection/infection": "^0.16.3",
"nyholm/psr7": "^1.0",
"phpunit/phpunit": "^9.2.0",
"phan/phan": "^3.0.2",
"phpunit/phpunit": "^9.2",
"yiisoft/cache": "^3.0@dev",
"yiisoft/composer-config-plugin": "^1.0@dev",
"yiisoft/di": "^3.0@dev",
Expand Down
16 changes: 0 additions & 16 deletions infection.json.dist

This file was deleted.

0 comments on commit 3c91d71

Please sign in to comment.