Skip to content

Commit

Permalink
Memories drift in and out of my mind, and the little people get left …
Browse files Browse the repository at this point in the history
…behind
  • Loading branch information
SamWilsn committed Jan 9, 2024
1 parent cf4a223 commit 559ba54
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
python-version: "3.10"

- name: Install Tox
run: pip install tox-gh
run: pip install tox

- name: Build Documentation
run: |
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,23 @@ jobs:
python-version: ${{ matrix.py }}

- name: Install Tox and any other packages
run: pip install tox-gh>=1.3 requests
run: "pip install 'tox>=4.11,<5' requests"

- name: Download Geth and add to $PATH
run: |
mkdir -p $GITHUB_WORKSPACE/bin
$GITHUB_WORKSPACE/scripts/download_geth_linux.py --dir $GITHUB_WORKSPACE/bin
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
- name: Run Tox
run: tox
- name: Run Tox (CPython)
if: "${{ !startsWith(matrix.py, 'pypy') }}"
run: tox -e static,optimized,py3

- name: Run Tox (PyPy)
if: "${{ startsWith(matrix.py, 'pypy') }}"
run: tox -e pypy3
env:
PYPY_GC_MAX: "10G"

- name: Upload coverage to Codecov
if: "${{ !startsWith(matrix.py, 'pypy') }}"
Expand Down
12 changes: 6 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ test =

lint =
types-setuptools>=68.1.0.1,<69
isort>=5.12,<6
isort==5.13.2
mypy==1.5.1
black>=23.7.0,<24
flake8-spellcheck>=0.28,<0.29
flake8-docstrings>=1.7,<2
flake8-bugbear>=23.7.10,<24.0.0
flake8>=6.1,<7
black==23.12.0
flake8==6.1.0
flake8-bugbear==23.12.2
flake8-docstrings==1.7.0
flake8-spellcheck==0.28.0

doc =
docc>=0.1.0,<0.2.0
Expand Down
49 changes: 38 additions & 11 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,33 +1,60 @@
[tox]
min_version = 2.0
envlist = py3,pypy3
envlist = py3,pypy3,static

[gh]
python =
3.10 = py3, optimized
3.x = py3, optimized
pypy3.10 = pypy3

[testenv:{py3,pypy3}]
[testenv:static]
extras =
test
lint
optimized
test
doc
commands =
isort src tests setup.py --check --diff --skip-glob "tests/fixtures/*"
black src tests setup.py --check --diff --exclude "tests/fixtures/*"
flake8 src tests setup.py
mypy src tests setup.py --exclude "tests/fixtures/*" --namespace-packages
pytest -m "not slow and not evm_tools" -n auto --maxprocesses 8 --cov=ethereum --cov-report=term --cov-report "xml:{toxworkdir}/coverage.xml" --ignore-glob='tests/fixtures/*' --basetemp="{temp_dir}/pytest"
ethereum-spec-lint

[testenv:py3]
extras =
test
commands =
pytest \
-m "not slow and not evm_tools" \
-n auto --maxprocesses 5 \
--cov=ethereum --cov-report=term --cov-report "xml:{toxworkdir}/coverage.xml" \
--ignore-glob='tests/fixtures/*' \
--basetemp="{temp_dir}/pytest"

[testenv:pypy3]
extras =
test
passenv =
PYPY_GC_MAX
commands =
pytest \
--tb=no \
--show-capture=no \
--disable-warnings \
-m "not slow and not evm_tools" \
-n auto --maxprocesses 2 \
--ignore-glob='tests/fixtures/*' \
--basetemp="{temp_dir}/pytest"

[testenv:optimized]
extras =
test
optimized
passenv =
PYPY_GC_MAX
commands =
pytest -m "not slow and not evm_tools" -n auto --maxprocesses 8 --ignore-glob='tests/fixtures/*' --ignore-glob='tests/test_t8n.py' --basetemp="{temp_dir}/pytest" --optimized
pytest \
-m "not slow and not evm_tools" \
-n auto --maxprocesses 5 \
--ignore-glob='tests/fixtures/*' \
--ignore-glob='tests/test_t8n.py' \
--basetemp="{temp_dir}/pytest" \
--optimized

[testenv:doc]
basepython = python3
Expand Down

0 comments on commit 559ba54

Please sign in to comment.