Skip to content

Commit 207ebef

Browse files
authoredJun 4, 2021
Merge pull request #23 from web3p/github-ci
GitHub ci
2 parents 8511ea9 + 88d8da7 commit 207ebef

File tree

6 files changed

+53
-1504
lines changed

6 files changed

+53
-1504
lines changed
 

‎.github/workflows/php.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: PHP
2+
3+
on: ["push", "pull_request"]
4+
5+
jobs:
6+
build_and_test:
7+
name: Build and test rlp with ${{ matrix.php-version }}
8+
strategy:
9+
matrix:
10+
php-version: ["7.3", "7.4", "8.0"]
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php-version }}
19+
20+
- name: PHP version
21+
run: |
22+
php --version
23+
24+
- uses: actions/checkout@v2
25+
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate
28+
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v2
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-php-
37+
38+
- name: Install dependencies
39+
if: steps.composer-cache.outputs.cache-hit != 'true'
40+
run: composer install --prefer-dist --no-progress --no-suggest
41+
42+
- name: Run test suite
43+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
44+
45+
- uses: codecov/codecov-action@v1
46+
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}

‎.travis.yml

-18
This file was deleted.

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# rlp
22
Recursive Length Prefix Encoding in PHP.
33

4-
[![Build Status](https://travis-ci.org/web3p/rlp.svg?branch=master)](https://travis-ci.org/web3p/rlp)
4+
[![PHP](https://github.com/web3p/rlp/actions/workflows/php.yml/badge.svg)](https://github.com/web3p/rlp/actions/workflows/php.yml)
55
[![codecov](https://codecov.io/gh/web3p/rlp/branch/master/graph/badge.svg)](https://codecov.io/gh/web3p/rlp)
66
[![Licensed under the MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/web3p/rlp/blob/master/LICENSE)
77

‎composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"minimum-stability": "dev",
1313
"require-dev": {
14-
"phpunit/phpunit": "~7"
14+
"phpunit/phpunit": "~7 | ~8.0"
1515
},
1616
"autoload": {
1717
"psr-4": {
@@ -24,5 +24,7 @@
2424
}
2525
},
2626
"require": {
27+
"PHP": "^7.1 | ^8.0",
28+
"ext-mbstring": "*"
2729
}
2830
}

‎composer.lock

-1,482
This file was deleted.

‎test/TestCase.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TestCase extends BaseTestCase
1919
*
2020
* @return void
2121
*/
22-
public function setUp()
22+
public function setUp(): void
2323
{
2424
$this->rlp = new RLP;
2525
}
@@ -29,5 +29,5 @@ public function setUp()
2929
*
3030
* @return void
3131
*/
32-
public function tearDown() {}
32+
public function tearDown(): void {}
3333
}

0 commit comments

Comments
 (0)
Please sign in to comment.