Migrate to GitHub Actions (#467)
This commit is contained in:
parent
e09bd71bb6
commit
5de52b65c5
|
@ -10,6 +10,6 @@ insert_final_newline = true
|
|||
[*.ts]
|
||||
indent_style = tab
|
||||
|
||||
[{package.json,.travis.yml}]
|
||||
[{package.json}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
name: tokenbridge-contracts
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- run: npm install
|
||||
if: ${{ !steps.npm-cache.outputs.cache-hit }}
|
||||
- run: npm run lint
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- run: npm install
|
||||
if: ${{ !steps.npm-cache.outputs.cache-hit }}
|
||||
- run: npm run test
|
||||
gasreport:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- run: npm install
|
||||
if: ${{ !steps.npm-cache.outputs.cache-hit }}
|
||||
- run: npm run test:gasreport:ci
|
||||
env:
|
||||
CC_SECRET: ${{ secrets.CC_SECRET }}
|
||||
coverage:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 10
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
id: npm-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||
- run: npm install
|
||||
if: ${{ !steps.npm-cache.outputs.cache-hit }}
|
||||
- run: npm run coverage
|
||||
- name: Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
14
.travis.yml
14
.travis.yml
|
@ -1,14 +0,0 @@
|
|||
dist: trusty
|
||||
sudo: required
|
||||
group: beta
|
||||
language: node_js
|
||||
node_js:
|
||||
- "10"
|
||||
cache:
|
||||
yarn: true
|
||||
env:
|
||||
- $TASK=lint
|
||||
- $TASK=test
|
||||
- $TASK=coverage
|
||||
- $TASK=test:gasreport:ci
|
||||
script: "npm run $TASK"
|
|
@ -1,5 +1,5 @@
|
|||
[![Join the chat at https://gitter.im/poanetwork/poa-bridge](https://badges.gitter.im/poanetwork/poa-bridge.svg)](https://gitter.im/poanetwork/poa-bridge?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Build Status](https://api.travis-ci.org/poanetwork/tokenbridge-contracts.svg?branch=master)](https://travis-ci.org/poanetwork/tokenbridge-contracts)
|
||||
[![Build Status](https://github.com/poanetwork/tokenbridge-contracts/workflows/tokenbridge-contracts/badge.svg?branch=master)](https://github.com/poanetwork/tokenbridge-contracts/workflows/tokenbridge-contracts/badge.svg?branch=master)
|
||||
[![Coverage Status](https://coveralls.io/repos/github/poanetwork/tokenbridge-contracts/badge.svg?branch=master)](https://coveralls.io/github/poanetwork/tokenbridge-contracts?branch=master)
|
||||
|
||||
# POA Bridge Smart Contracts
|
||||
|
|
|
@ -3377,28 +3377,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"coveralls": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.6.tgz",
|
||||
"integrity": "sha512-Pgh4v3gCI4T/9VijVrm8Ym5v0OgjvGLKj3zTUwkvsCiwqae/p6VLzpsFNjQS2i6ewV7ef+DjFJ5TSKxYt/mCrA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"growl": "~> 1.10.0",
|
||||
"js-yaml": "^3.13.1",
|
||||
"lcov-parse": "^0.0.10",
|
||||
"log-driver": "^1.2.7",
|
||||
"minimist": "^1.2.0",
|
||||
"request": "^2.86.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-error-class": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
|
||||
|
@ -4373,7 +4351,7 @@
|
|||
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
|
||||
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
|
||||
"requires": {
|
||||
"ethereumjs-abi": "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b",
|
||||
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"ethereumjs-util": "^5.1.1"
|
||||
}
|
||||
},
|
||||
|
@ -20137,12 +20115,6 @@
|
|||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
|
||||
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
|
||||
},
|
||||
"growl": {
|
||||
"version": "1.10.5",
|
||||
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
|
||||
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
|
||||
"dev": true
|
||||
},
|
||||
"handlebars": {
|
||||
"version": "4.5.3",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz",
|
||||
|
@ -21128,12 +21100,6 @@
|
|||
"invert-kv": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"lcov-parse": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz",
|
||||
"integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=",
|
||||
"dev": true
|
||||
},
|
||||
"level-codec": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz",
|
||||
|
@ -21355,12 +21321,6 @@
|
|||
"resolved": "https://registry.npmjs.org/lodash.values/-/lodash.values-4.3.0.tgz",
|
||||
"integrity": "sha1-o6bCsOvsxcLLocF+bmIP6BtT00c="
|
||||
},
|
||||
"log-driver": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
|
||||
"integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==",
|
||||
"dev": true
|
||||
},
|
||||
"loglevel": {
|
||||
"version": "1.6.8",
|
||||
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.8.tgz",
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
"chai": "^4.2.0",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"chai-bn": "^0.1.1",
|
||||
"coveralls": "^3.0.6",
|
||||
"eslint": "^6.3.0",
|
||||
"eslint-config-airbnb-base": "^14.0.0",
|
||||
"eslint-config-prettier": "^6.2.0",
|
||||
|
|
|
@ -57,10 +57,6 @@ fi
|
|||
|
||||
if [ "$SOLIDITY_COVERAGE" = true ]; then
|
||||
node --max-old-space-size=4096 node_modules/.bin/truffle test 2>/dev/null; istanbul report lcov
|
||||
|
||||
if [ "$CONTINUOUS_INTEGRATION" = true ]; then
|
||||
cat coverage/lcov.info | node_modules/.bin/coveralls
|
||||
fi
|
||||
else
|
||||
node_modules/.bin/truffle test --network ganache "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue