Skip to content

Commit

Permalink
Merge pull request #23 from web3p/github-ci
Browse files Browse the repository at this point in the history
GitHub ci
  • Loading branch information
sc0Vu authored Jun 4, 2021
2 parents 8511ea9 + 88d8da7 commit 207ebef
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 1,504 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: PHP

on: ["push", "pull_request"]

jobs:
build_and_test:
name: Build and test rlp with ${{ matrix.php-version }}
strategy:
matrix:
php-version: ["7.3", "7.4", "8.0"]

runs-on: ubuntu-latest

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}

- name: PHP version
run: |
php --version
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run test suite
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# rlp
Recursive Length Prefix Encoding in PHP.

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

Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"minimum-stability": "dev",
"require-dev": {
"phpunit/phpunit": "~7"
"phpunit/phpunit": "~7 | ~8.0"
},
"autoload": {
"psr-4": {
Expand All @@ -24,5 +24,7 @@
}
},
"require": {
"PHP": "^7.1 | ^8.0",
"ext-mbstring": "*"
}
}
Loading

0 comments on commit 207ebef

Please sign in to comment.