-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Patch up python-v2 * trigger build * fix build * install poetry * change python version * fix test * add lint, fix up * forgot to add in actions changes * fix lock * add black dependency * fix lock again * change black verison
- Loading branch information
Showing
6 changed files
with
940 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,75 @@ | ||
name: "[v4-client-py] Lint, Test" | ||
name: "[v4-client-py-v2] Lint, Test" | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
paths: | ||
- 'v4-client-py/**' | ||
- 'v4-client-py-v2/**' | ||
push: | ||
paths: | ||
- 'v4-client-py/**' | ||
- 'v4-client-py-v2/**' | ||
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 | ||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./v4-client-py-v2 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Cache poetry dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install poetry | ||
run: pip install poetry | ||
|
||
- name: Install Dependencies | ||
run: poetry install | ||
|
||
- name: Lint | ||
run: poetry run black --check ./dydx_v4_client ./tests ./examples | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./v4-client-py | ||
working-directory: ./v4-client-py-v2 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
python-version: 3.12 | ||
|
||
- name: Cache poetry dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pypoetry | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install poetry | ||
run: pip install poetry | ||
|
||
- name: Install Dependencies | ||
run: sudo pip install -r requirements-test.txt | ||
run: poetry install | ||
|
||
- name: Run pytest | ||
run: pytest | ||
run: poetry run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.