Skip to content

Commit

Permalink
Add lint + test workflow for v4-client-py (#2)
Browse files Browse the repository at this point in the history
* Add lint + test workflow for v4-client-py
  • Loading branch information
jiajames authored Aug 16, 2023
1 parent be77206 commit 700b0fb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 4 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/py-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "[v4-client-py] Lint, Test"

on: # yamllint disable-line rule:truthy
pull_request:
paths:
- 'v4-client-py/**'
push:
paths:
- 'v4-client-py/**'
branches:
- main
- "release/*"

jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./v4-client-py
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Dependencies
run: pip install -r requirements-lint.txt

- name: Lint
run: flake8

test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./v4-client-py
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Dependencies
run: sudo pip install -r requirements-test.txt

- name: Run pytest
run: pytest
2 changes: 1 addition & 1 deletion v4-client-py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ examples/faucet_endpoint.py
Wait for a few seconds for the faucet transaction to commit, then run

```
pytest -v -c pytest_integration.ini
pytest -v -c pytest_integration.ini
```
4 changes: 2 additions & 2 deletions v4-client-py/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Cython>=0.29.0
aiohttp>=3.8.1
bech32>=1.2.0
bip_utils>=1.6.0
brownie>=1.14.6
brownie>=0.5.0
cytoolz>=0.12.1
dateparser>=1.0.0
#dydxpy>=0.24.0
dydxpy>=0.3.1
ecdsa>=0.16.0
eth_keys>=0.4.0
eth-account>=0.9.0
Expand Down
2 changes: 1 addition & 1 deletion v4-client-py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bip_utils>=2.7.0
brownie>=0.5.0
cytoolz>=0.12.1
dateparser>=1.0.0
#dydxpy>=0.24.0
dydxpy>=0.3.1
ecdsa>=0.18.0
eth_keys>=0.4.0
eth-account>=0.9.0
Expand Down

0 comments on commit 700b0fb

Please sign in to comment.