Skip to content

Commit c8cb31b

Browse files
authored
fix(ci): updated version of phpunit and fixed workflow issues (#17)
* perf: updated version of phpunit and fixed workflow issues * chore: updated nodejs version in workflow
1 parent 1b5fed5 commit c8cb31b

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
needs: [ test, upload-coverage ]
7575
steps:
7676
- uses: actions/checkout@v2
77-
- uses: actions/setup-node@v1
77+
- uses: actions/setup-node@v2
7878
with:
79-
node-version: '14.17'
79+
node-version: 'lts/*'
8080

8181
- name: Run semantic-release
8282
env:

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ composer.lock
66
*.iml
77

88
# coverage report
9-
/build
9+
/build
10+
.phpunit*

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Yii-Permission
22

3-
[![Build Status](https://travis-ci.org/php-casbin/yii-permission.svg?branch=master)](https://travis-ci.org/php-casbin/yii-permission)
3+
[![Build Status](https://github.com/php-casbin/yii-permission/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/php-casbin/yii-permission/actions/workflows/build.yml)
44
[![Coverage Status](https://coveralls.io/repos/github/php-casbin/yii-permission/badge.svg)](https://coveralls.io/github/php-casbin/yii-permission)
55
[![Latest Stable Version](https://poser.pugx.org/casbin/yii-permission/v/stable)](https://packagist.org/packages/casbin/yii-permission)
66
[![Total Downloads](https://poser.pugx.org/casbin/yii-permission/downloads)](https://packagist.org/packages/casbin/yii-permission)

composer.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"casbin/casbin": "~3.1"
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "~7.0",
26+
"phpunit/phpunit": "~7.0|~8.0|~9.0|~10.5",
2727
"php-coveralls/php-coveralls": "^2.1",
2828
"yiisoft/yii2-app-basic": "~2.0.14"
2929
},
@@ -42,5 +42,10 @@
4242
"type": "composer",
4343
"url": "https://asset-packagist.org"
4444
}
45-
]
46-
}
45+
],
46+
"config": {
47+
"allow-plugins": {
48+
"yiisoft/yii2-composer": true
49+
}
50+
}
51+
}

tests/AdapterTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ protected function refreshApplication()
382382
/**
383383
* This method is called before each test.
384384
*/
385-
protected function setUp()/* The :void return type declaration that should be here would cause a BC issue */
385+
protected function setUp(): void/* The :void return type declaration that should be here would cause a BC issue */
386386
{
387387
if (!$this->app) {
388388
$this->refreshApplication();
@@ -394,7 +394,7 @@ protected function setUp()/* The :void return type declaration that should be he
394394
/**
395395
* This method is called after each test.
396396
*/
397-
protected function tearDown()/* The :void return type declaration that should be here would cause a BC issue */
397+
protected function tearDown(): void/* The :void return type declaration that should be here would cause a BC issue */
398398
{
399399
}
400400

0 commit comments

Comments
 (0)