Skip to content

Commit

Permalink
Merge pull request #34 from web3p/github-ci
Browse files Browse the repository at this point in the history
GitHub ci
  • Loading branch information
sc0Vu committed Jun 5, 2021
2 parents 0e63f27 + 9767770 commit 7dd97d8
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 1,821 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 ethereum-tx 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 }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
composer.phar
/vendor/

composer.lock
.DS_Store
# Commit your application's lock file http:https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
# You may choose to ignore a library lock file http:https://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
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,5 +1,5 @@
# ethereum-tx
[![Build Status](https://travis-ci.org/web3p/ethereum-tx.svg?branch=master)](https://travis-ci.org/web3p/ethereum-tx)
[![PHP](https://github.com/web3p/ethereum-tx/actions/workflows/php.yml/badge.svg)](https://github.com/web3p/ethereum-tx/actions/workflows/php.yml)
[![codecov](https://codecov.io/gh/web3p/ethereum-tx/branch/master/graph/badge.svg)](https://codecov.io/gh/web3p/ethereum-tx)

Ethereum transaction library in PHP.
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require-dev": {
"phpunit/phpunit": "^6.1"
"phpunit/phpunit": "~7 | ~8.0"
},
"autoload": {
"psr-4": {
Expand All @@ -23,8 +23,9 @@
}
},
"require": {
"web3p/rlp": "0.3.2",
"web3p/ethereum-util": "~0.1.2",
"PHP": "^7.1 | ^8.0",
"web3p/rlp": "0.3.3",
"web3p/ethereum-util": "~0.1.3",
"kornrunner/keccak": "~1",
"simplito/elliptic-php": "~1.0.6"
}
Expand Down
Loading

0 comments on commit 7dd97d8

Please sign in to comment.