Skip to content

Commit 0fc97b4

Browse files
authored
Merge pull request ethereumjs#627 from ethereumjs/github-actions
Add github actions
2 parents 475a8c2 + f866171 commit 0fc97b4

File tree

6 files changed

+136
-14
lines changed

6 files changed

+136
-14
lines changed

.github/workflows/vm-coverage.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: vm-coverage
2+
on: [push]
3+
jobs:
4+
coverage:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/setup-node@v1
8+
with:
9+
node-version: 8.x
10+
11+
- uses: actions/checkout@v1
12+
- run: npm install
13+
- run: npm run coverage
14+
- run: npm run coveralls
15+
16+
- name: Post coverage data to coveralls.io for analysis
17+
uses: coverallsapp/github-action@master
18+
with:
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
path-to-lcov: .nyc_output/lcov.info

.github/workflows/vm-lint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: vm-lint
2+
on: [push]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/setup-node@v1
8+
with:
9+
node-version: 8.x
10+
11+
- uses: actions/checkout@v1
12+
- run: npm install
13+
- run: npm run lint
14+
env:
15+
CI: true

.github/workflows/vm-test.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: vm-test
2+
on: [push]
3+
jobs:
4+
test-api:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/setup-node@v1
8+
with:
9+
node-version: 8.x
10+
11+
- uses: actions/checkout@v1
12+
- run: npm install
13+
14+
- run: npm run testAPI
15+
env:
16+
CI: true
17+
18+
- run: npm run testAPI:browser
19+
env:
20+
CI: true
21+
22+
test-state:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
hardfork: ['Byzantium', 'Constantinople', 'Petersburg', 'Istanbul']
27+
28+
steps:
29+
- uses: actions/setup-node@v1
30+
with:
31+
node-version: 8.x
32+
33+
- uses: actions/checkout@v1
34+
- run: npm install
35+
- run: mkdir -p tests/tape
36+
37+
- name: Run ${{ matrix.hardfork }} state tests
38+
run: |
39+
npm run ${{ format('testState{0}', matrix.hardfork) }} | tee -a ${{ format('testState{0}.tap', matrix.hardfork) }};
40+
cat ${{ format('testState{0}.tap', matrix.hardfork) }} | npx tap-xunit > ${{ format('testState{0}.xml', matrix.hardfork) }}
41+
env:
42+
CI: true
43+
44+
- name: Upload ${{ matrix.hardfork }} state test metadata (if failure)
45+
uses: actions/upload-artifact@v1
46+
if: failure()
47+
with:
48+
name: ${{ format('vmTestState{0}', matrix.hardfork) }}
49+
path: ${{ format('tests/tape/testState{0}.xml', matrix.hardfork) }}
50+
51+
- name: Upload state test metadata
52+
uses: actions/upload-artifact@v1
53+
with:
54+
name: vmTestStateMetadata
55+
path: tests/tape
56+
57+
test-blockchain:
58+
runs-on: ubuntu-latest
59+
strategy:
60+
matrix:
61+
hardfork: ['', 'Petersburg']
62+
63+
steps:
64+
- uses: actions/setup-node@v1
65+
with:
66+
node-version: 8.x
67+
68+
- uses: actions/checkout@v1
69+
- run: npm install
70+
- run: mkdir -p tests/tape
71+
72+
- name: Run ${{ matrix.hardfork }} blockchain state tests
73+
run: |
74+
npm run ${{ format('testBlockchain{0}', matrix.hardfork) }} | tee -a ${{ format('testBlockchain{0}.tap', matrix.hardfork) }};
75+
cat ${{ format('testBlockchain{0}.tap', matrix.hardfork) }} | npx tap-xunit > ${{ format('tests/tape/testBlockchain{0}.xml', matrix.hardfork) }}
76+
env:
77+
CI: true
78+
79+
- name: Upload ${{ matrix.hardfork }} blockchain state test metadata (if failure)
80+
uses: actions/upload-artifact@v1
81+
if: failure()
82+
with:
83+
name: ${{ format('vmTestBlockchainState{0}', matrix.hardfork) }}
84+
path: ${{ format('tests/tape/testBlockchain{0}.xml', matrix.hardfork) }}
85+
86+
- name: Upload blockhain state test metadata
87+
uses: actions/upload-artifact@v1
88+
with:
89+
name: vmTestBlockchainStateMetadata
90+
path: tests/tape

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SYNOPSIS
22

33
[![NPM Package](https://img.shields.io/npm/v/ethereumjs-vm.svg?style=flat-square)](https://www.npmjs.org/package/ethereumjs-vm)
4-
[![Build Status](https://img.shields.io/circleci/project/github/ethereumjs/ethereumjs-vm/master.svg)](https://circleci.com/gh/ethereumjs/ethereumjs-vm)
4+
[![Actions Status](https://github.com/ethereumjs/ethereumjs-vm/workflows/vm-test/badge.svg)](https://github.com/ethereumjs/ethereumjs-vm/actions)
55
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/ethereumjs-vm.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/ethereumjs-vm)
66
[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs)
77

developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ It is also possible to only run the tests from the skip lists:
8383

8484
### CI Test Integration
8585

86-
Tests are run on `CircleCI` on every PR, configuration can be found in `.circleci/config.yml`.
86+
Tests are run on [Actions](https://github.com/ethereumjs/ethereumjs-vm/actions) on every PR, configuration can be found in `.github/workflows`.
8787

8888
### Debugging
8989

karma.conf.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Karma configuration
22
// Generated on Fri Mar 01 2019 22:02:29 GMT+0100 (CET)
33

4-
module.exports = function (config) {
4+
module.exports = function(config) {
55
config.set({
6-
76
// base path that will be used to resolve all patterns (eg. files, exclude)
87
basePath: '',
98

@@ -12,19 +11,17 @@ module.exports = function (config) {
1211
frameworks: ['browserify', 'detectBrowsers', 'tap'],
1312

1413
// list of files / patterns to load in the browser
15-
files: [
16-
'./tests/api/**/*.js'
17-
],
14+
files: ['./tests/api/**/*.js'],
1815

1916
// list of files / patterns to exclude
2017
exclude: [
21-
'./tests/api/state/stateManager.js' // 4, "# should clear the cache when the state root is set"
18+
'./tests/api/state/stateManager.js', // 4, "# should clear the cache when the state root is set"
2219
],
2320

2421
// preprocess matching files before serving them to the browser
2522
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
2623
preprocessors: {
27-
'./tests/api/**/*.js': [ 'browserify' ]
24+
'./tests/api/**/*.js': ['browserify'],
2825
},
2926

3027
// test results reporter to use
@@ -47,7 +44,7 @@ module.exports = function (config) {
4744

4845
// start these browsers
4946
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
50-
browsers: ['Firefox'],
47+
browsers: ['FirefoxHeadless'],
5148

5249
// Continuous Integration mode
5350
// if true, Karma captures browsers, runs the tests and exits
@@ -57,9 +54,9 @@ module.exports = function (config) {
5754
detectBrowsers: {
5855
enabled: true,
5956
usePhantomJS: false,
60-
postDetection: function (availableBrowsers) {
61-
return [ 'Firefox' ]
62-
}
57+
postDetection: function(availableBrowsers) {
58+
return ['FirefoxHeadless']
59+
},
6360
},
6461

6562
// Concurrency level
@@ -68,6 +65,6 @@ module.exports = function (config) {
6865

6966
// Fail after timeout
7067
browserDisconnectTimeout: 100000,
71-
browserNoActivityTimeout: 100000
68+
browserNoActivityTimeout: 100000,
7269
})
7370
}

0 commit comments

Comments
 (0)