Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #119 from ethereumjs/use-gh-actions
Browse files Browse the repository at this point in the history
Upgrade CI Provider to GH Actions
  • Loading branch information
holgerd77 authored Jun 2, 2020
2 parents 2d86f29 + 9056ebd commit 3af85bc
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 33 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build
on:
push:
branches:
- master
tags:
- '*'
pull_request:
types: [opened, reopened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12, 13]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v1
- run: npm install
- run: npm run coverage
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test-browser:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npm install
- run: npm run test:browser
25 changes: 0 additions & 25 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,6 +1,6 @@
# SYNOPSIS

[![Build Status](https://travis-ci.org/ethereumjs/ethereumjs-client.svg?branch=master)](https://travis-ci.org/ethereumjs/ethereumjs-client)
[![Actions Status](https://github.com/ethereumjs/ethereumjs-client/workflows/Build/badge.svg)](https://github.com/ethereumjs/ethereumjs-client/actions)
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/ethereumjs-client.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/ethereumjs-client)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs)
Expand Down
44 changes: 44 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = function (config) {
config.set({
frameworks: ['browserify', 'tap'],

files: ['dist/bundle.js', './test/**/*.js'],

// Exclude [test/node.js, test/net, test/sync, test/service] due to error: `Sorry, but CommonJS module replacement with td.replace() is only supported under Node.js runtimes.`
// Exclude [test/rpc] due to error: `TypeError: superCtor is undefined`
// Exclude [test/util/parse] due to hanging on `should parse geth params file`
// Exclude [test/logging] due to error: `TypeError: logger.format is undefined`
exclude: [
'./test/node.js',
'./test/net/**/*.js',
'./test/sync/**/*.js',
'./test/service/**/*.js',
'./test/rpc/**/*.js',
'./test/util/parse.js',
'./test/logging.js',
'./test/integration/**/*.js'
],

preprocessors: {
'./test/**/*.js': ['browserify']
},

reporters: ['progress'],

browsers: ['FirefoxHeadless', 'ChromeHeadless'],

colors: true,

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,

// Fail after timeout
browserDisconnectTimeout: 100000,
browserNoActivityTimeout: 100000
})
}
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"lib"
],
"scripts": {
"coverage": "nyc npm run test && nyc report --reporter=text-lcov > .nyc_output/lcov.info",
"coveralls": "npm run coverage && coveralls <.nyc_output/lcov.info",
"coverage": "nyc npm run test && nyc report --reporter=lcov",
"docs": "jsdoc2md --no-cache -c .jsdoc.json lib/*.js > docs/API.md",
"lint": "standard",
"lint:fix": "standard --fix",
"unit": "tape 'test/!(integration)/**/*.js'",
"integration": "tape 'test/integration/**/*.js'",
"test": "npm run lint && npm run unit && npm run integration",
"build": "npm run test && browserify browser/index.js -s ethereumjs -t babelify --outfile dist/bundle.js"
"test": "npm run lint && npm run test:unit && npm run test:integration",
"test:unit": "tape 'test/!(integration)/**/*.js'",
"test:integration": "tape 'test/integration/**/*.js'",
"test:browser": "npm run build && karma start karma.conf.js",
"build": "browserify browser/index.js -s ethereumjs -t babelify --outfile dist/bundle.js"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -90,9 +90,13 @@
"@babel/runtime-corejs2": "^7.1.2",
"babelify": "^10.0.0",
"browserify": "^16.2.3",
"coveralls": "^3.0.0",
"husky": "^2.1.0",
"json-to-markdown": "^1.0.4",
"karma": "^5.0.9",
"karma-browserify": "^7.0.0",
"karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.3.0",
"karma-tap": "^4.2.0",
"nyc": "~13.3.0",
"pino": "^5.8.0",
"pino-pretty": "^2.2.2",
Expand Down

0 comments on commit 3af85bc

Please sign in to comment.