Skip to content

Commit

Permalink
No pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Apr 10, 2024
1 parent bcddfc7 commit 68a757a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 69 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/.pre-commit-config.yaml

This file was deleted.

22 changes: 15 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,25 @@ jobs:
pip install -r dev-requirements.txt
pip install .
echo "$PATH"
# Install zkvyper and era_test_node from binary repositories
curl https://github.com/matter-labs/zkvyper-bin/raw/66cc159d9b6/linux-amd64/zkvyper-linux-amd64-musl-v1.4.0 \
-o ~/.local/bin/zkvyper && chmod +x ~/.local/bin/zkvyper
curl https://github.com/matter-labs/era-test-node/releases/download/v0.1.0-alpha.19/era_test_node-v0.1.0-alpha.19-x86_64-unknown-linux-gnu.tar.gz \
-o era_test_node.tar.gz && tar -xvf era_test_node.tar.gz && mv era_test_node ~/.local/bin/era_test_node
curl --location https://raw.githubusercontent.com/matter-labs/zkvyper-bin/66cc159d9b6af3b5616f6ed7199bd817bf42bf0a/linux-amd64/zkvyper-linux-amd64-musl-v1.4.0 \
--silent --output /usr/local/bin/zkvyper && \
chmod +x /usr/local/bin/zkvyper && \
zkvyper --version
curl --location https://github.com/matter-labs/era-test-node/releases/download/v0.1.0-alpha.19/era_test_node-v0.1.0-alpha.19-x86_64-unknown-linux-gnu.tar.gz \
--silent --output era_test_node.tar.gz && \
tar --extract --file=era_test_node.tar.gz && \
mv era_test_node /usr/local/bin/era_test_node &&
era_test_node --version && \
rm era_test_node.tar.gz
- name: Run Unit Tests
env:
PYTHONPATH: ${{ github.workspace }}
# pass internals to pytest-cov, since we are testing a pytest plugin.
# See https://github.com/pytest-dev/pytest-cov/blob/2c9f2170/docs/plugins.rst
COV_CORE_SOURCE: boa_zksync
COV_CORE_CONFIG: .coveragerc
COV_CORE_DATAFILE: .coverage.eager

run: >-
pytest
--cov=boa_zksync
Expand All @@ -50,3 +55,6 @@ jobs:
--cov-fail-under=70
-nauto
tests
- name: Run Lint
run: make lint
42 changes: 0 additions & 42 deletions .pre-commit-config.yaml

This file was deleted.

32 changes: 29 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,41 @@

all: lint build

lint:
pre-commit run --all-files
lint: mypy black flake8 isort

mypy:
mypy \
--disable-error-code "annotation-unchecked" \
--follow-imports=silent \
--ignore-missing-imports \
--implicit-optional \
-p vyper

black:
black -C -t py311 vyper/ tests/ setup.py --force-exclude=vyper/version.py

flake8: black
flake8 vyper/ tests/

isort: black
isort vyper/ tests/ setup.py

build:
pip install .

# run tests without forked tests (which require access to a node)
test:
pytest tests/ --ignore=tests/integration/fork/ --ignore=tests/integration/network/
pytest tests/

coverage:
COV_CORE_SOURCE=boa_zksync COV_CORE_CONFIG=.coveragerc COV_CORE_DATAFILE=.coverage.eager \
pytest \
--cov=boa_zksync \
--cov-append \
--cov-report term-missing:skip-covered \
--cov-fail-under=70 \
-nauto \
tests

clean:
@find . -name '*.pyc' -exec rm -f {} +
Expand Down

0 comments on commit 68a757a

Please sign in to comment.