Skip to content

Commit

Permalink
use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed Feb 28, 2020
1 parent ccc229e commit e9d4657
Show file tree
Hide file tree
Showing 18 changed files with 363 additions and 569 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "Test"
on:
push:
branches:
- master
tags:
- "*"
pull_request:
types: [opened, reopened, synchronize]
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node: [8, 10, 11, 12]
env:
TEST: "unit"
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v1
- run: bash ./scripts/install.sh
- run: bash ./scripts/ci.sh
build_and_lint:
runs-on: ${{ matrix.os }}
env:
TEST: "build_and_lint"
steps:
- uses: actions/setup-node@v1
with:
node-version: 10
- uses: actions/checkout@v1
- run: bash ./scripts/install.sh
- run: bash ./scripts/ci.sh
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
testCmd:
[
"unit_and_e2e_clients",
"e2e_ganache",
"e2e_mosaic",
"e2e_ens",
"e2e_browsers",
]
env:
TEST: ${{ matrix.testCmd }}
CI: true
DISPLAY: :99.0
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v1
- run: bash ./scripts/install.sh

- run: bash ./scripts/ci.sh
continue-on-error: ${{ matrix.testCmd == 'e2e_ganache' || matrix.testCmd == 'e2e_mosiac' }}

- name: Send coverage reports to Coveralls
if: env.TEST == 'unit_and_e2e_clients'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
e2e_windows:
runs-on: windows-latest
env:
TEST: "e2e_windows"
CI: true
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v1
- run: bash ./scripts/install.sh
- run: bash ./scripts/ci.sh
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ coverage
scripts
.gitignore
.editorconfig
.travis.yml
.npmignore
.DS_Store
32 changes: 16 additions & 16 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Please include a summary of the change and be sure you follow the contributions rules we do provide [here](./CONTRIBUTIONS.md)

<!---
<!---
Optional if an issue is fixed:
Fixes #(issue)
-->
Expand All @@ -11,21 +11,21 @@ Fixes #(issue)

<!--- Please delete options that are not relevant. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist:

- [ ] I have selected the correct base branch.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [ ] I ran ```npm run dtslint``` with success and extended the tests and types if necessary.
- [ ] I ran ```npm run test:unit``` with success.
- [ ] I have executed ``npm run test:cov`` and my test cases do cover all lines and branches of the added code.
- [ ] I ran ```npm run build-all``` and tested the resulting file/'s from ```dist``` folder in a browser.
- [ ] I have updated the ``CHANGELOG.md`` file in the root folder.
- [ ] I have tested my code on the live network.
- [ ] I have selected the correct base branch.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no new warnings.
- [ ] Any dependent changes have been merged and published in downstream modules.
- [ ] I ran `npm run dtslint` with success and extended the tests and types if necessary.
- [ ] I ran `npm run test:unit` with success.
- [ ] I have executed `npm run test:coverage` and my test cases do cover all lines and branches of the added code.
- [ ] I ran `npm run build-all` and tested the resulting file/'s from `dist` folder in a browser.
- [ ] I have updated the `CHANGELOG.md` file in the root folder.
- [ ] I have tested my code on the live network.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# web3.js - Ethereum JavaScript API

[![Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![npm](https://img.shields.io/npm/dm/web3.svg)](https://www.npmjs.com/package/web3) [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url]
[![Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![npm](https://img.shields.io/npm/dm/web3.svg)](https://www.npmjs.com/package/web3) [![Build Status][actions-image]][actions-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url]
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)

This is the Ethereum [JavaScript API][docs]
Expand Down Expand Up @@ -53,11 +53,13 @@ Or via jsDelivr CDN
```html
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
```

UNPKG

```html
<script src="https://unpkg.com/web3@latest/dist/web3.min.js"></script>
```

## Usage

```js
Expand All @@ -77,9 +79,9 @@ console.log(web3);
Additionally you can set a provider using `web3.setProvider()` (e.g. WebsocketProvider):

```js
web3.setProvider('ws://localhost:8546');
web3.setProvider("ws://localhost:8546");
// or
web3.setProvider(new Web3.providers.WebsocketProvider('ws://localhost:8546'));
web3.setProvider(new Web3.providers.WebsocketProvider("ws://localhost:8546"));
```

There you go, now you can use it:
Expand All @@ -95,8 +97,8 @@ We support types within the repo itself. Please open an issue here if you find a
You can use `web3.js` as follows:

```typescript
import Web3 from 'web3';
const web3 = new Web3('ws://localhost:8546');
import Web3 from "web3";
const web3 = new Web3("ws://localhost:8546");
```

If you are using the types in a `commonjs` module like for example a node app you just have to enable `esModuleInterop` in your `tsconfig` compile option, also enable `allowSyntheticDefaultImports` for typesystem compatibility:
Expand Down Expand Up @@ -170,8 +172,8 @@ The contribution guidelines are provided in [CONTRIBUTIONS](./CONTRIBUTIONS.md)
[docs]: http://web3js.readthedocs.io/
[npm-image]: https://badge.fury.io/js/web3.png
[npm-url]: https://npmjs.org/package/web3
[travis-image]: https://travis-ci.org/ethereum/web3.js.svg
[travis-url]: https://travis-ci.org/ethereum/web3.js
[actions-image]: https://github.com/ethereum/web3.js/workflows/Test/badge.svg
[actions-url]: https://github.com/ethereum/web3.js/actions
[dep-image]: https://david-dm.org/ethereum/web3.js.svg
[dep-url]: https://david-dm.org/ethereum/web3.js
[dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg
Expand Down
138 changes: 68 additions & 70 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,73 @@
{
"namespace": "ethereum",
"name": "web3",
"version": "1.2.6",
"description": "Ethereum JavaScript API",
"license": "LGPL-3.0",
"main": [
"./dist/web3.min.js"
],
"moduleType": "global",
"dependencies": {
"bn.js": ">=4.11.6"
},
"repository": {
"type": "git",
"url": "git://github.com/ethereum/web3.js.git"
},
"homepage": "https://github.com/ethereum/web3.js",
"bugs": {
"url": "https://github.com/ethereum/web3.js/issues"
},
"keywords": [
"Ethereum",
"JavaScript",
"RPC",
"Swarm",
"Whisper",
"Smart Contracts",
"API"
],
"authors": [
{
"name": "Fabian Vogelsteller",
"email": "fabian@ethereum.org",
"homepage": "http://frozeman.de"
"namespace": "ethereum",
"name": "web3",
"version": "1.2.6",
"description": "Ethereum JavaScript API",
"license": "LGPL-3.0",
"main": ["./dist/web3.min.js"],
"moduleType": "global",
"dependencies": {
"bn.js": ">=4.11.6"
},
{
"name": "Marek Kotewicz",
"email": "marek@parity.io",
"url": "https://github.com/debris"
"repository": {
"type": "git",
"url": "git://github.com/ethereum/web3.js.git"
},
{
"name": "Marian Oancea",
"url": "https://github.com/cubedro"
"homepage": "https://github.com/ethereum/web3.js",
"bugs": {
"url": "https://github.com/ethereum/web3.js/issues"
},
{
"name": "Gav Wood",
"email": "g@parity.io",
"homepage": "http://gavwood.com"
},
{
"name": "Jeffery Wilcke",
"email": "jeffrey.wilcke@ethereum.org",
"url": "https://github.com/obscuren"
}
],
"ignore": [
"test",
"packages",
"src",
"node_modules",
"package.json",
"package.js",
".versions",
".bowerrc",
".editorconfig",
".gitignore",
".jshintrc",
".npmignore",
".travis.yml",
"gulpfile.js",
"index.js",
"**/*.txt"
]
"keywords": [
"Ethereum",
"JavaScript",
"RPC",
"Swarm",
"Whisper",
"Smart Contracts",
"API"
],
"authors": [
{
"name": "Fabian Vogelsteller",
"email": "fabian@ethereum.org",
"homepage": "http://frozeman.de"
},
{
"name": "Marek Kotewicz",
"email": "marek@parity.io",
"url": "https://github.com/debris"
},
{
"name": "Marian Oancea",
"url": "https://github.com/cubedro"
},
{
"name": "Gav Wood",
"email": "g@parity.io",
"homepage": "http://gavwood.com"
},
{
"name": "Jeffery Wilcke",
"email": "jeffrey.wilcke@ethereum.org",
"url": "https://github.com/obscuren"
}
],
"ignore": [
"test",
"packages",
"src",
"node_modules",
"package.json",
"package.js",
".versions",
".bowerrc",
".editorconfig",
".gitignore",
".jshintrc",
".npmignore",
".github",
"gulpfile.js",
"index.js",
"**/*.txt"
]
}
Loading

0 comments on commit e9d4657

Please sign in to comment.