Skip to content

Commit 521aa2b

Browse files
author
feliam
authored
Merge pull request #42 from crytic/dev-gitactions
Add gitactions based simple CI
2 parents eaac227 + c8b3bbb commit 521aa2b

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### pyvmasm version
2+
<!--- pip show pyevmasm | grep Version --->
3+
4+
### Python version
5+
<!--- python --version --->
6+
7+
### Summary of the problem
8+
<!--- Try to include a script reproducing the issue --->
9+
10+

.github/workflows/main.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Set up Python 3.6
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.6
18+
- name: Lint
19+
if: github.event_name == 'pull_request'
20+
env:
21+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
22+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
23+
run: |
24+
pip install black
25+
pip install mypy
26+
python setup.py install
27+
black --version
28+
git diff --name-only $BASE_SHA..$HEAD_SHA | grep "*.py" | xargs black --diff --check
29+
mypy --version
30+
mypy pyevmasm
31+
32+
test37:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- name: Set up Python 3.7
39+
uses: actions/setup-python@v1
40+
with:
41+
python-version: 3.7
42+
- name: Run Tests 37
43+
run: |
44+
python setup.py install
45+
python -m unittest discover "tests/"
46+
47+
test27:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Set up Python 2.7
54+
uses: actions/setup-python@v1
55+
with:
56+
python-version: 2.7
57+
- name: Run Tests 27
58+
run: |
59+
python setup.py install
60+
python -m unittest discover "tests/"
61+

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# pyevmasm
2+
[![Build Status](https://github.com/crytic/pyevmasm/workflows/CI/badge.svg)](https://github.com/crytic/pyevmasm/actions?query=workflow%3ACI)
3+
24
[![PyPI version](https://badge.fury.io/py/pyevmasm.svg)](https://badge.fury.io/py/pyevmasm)
35
[![Slack Status](https://empireslacking.herokuapp.com/badge.svg)](https://empireslacking.herokuapp.com)
46

pyevmasm/evmasm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from future.builtins import next, bytes # type: ignore
66
import copy
77

8-
DEFAULT_FORK = "petersburg"
8+
DEFAULT_FORK = "istanbul"
99

1010
"""
1111
Example use::

0 commit comments

Comments
 (0)