-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test,ci,feat: (1) Use poetry for pkg management. (2) Improve CI. (3) …
…Re-gen protos for v0.12.1-alpha of nibiru (#53) * fix for paraams * fix: make it so that make proto-gen runs even if the proto dir already exists * feat(network): add devnet to the Network class * test(chain_info_test): test_query_vpool_reserve_assets * docs(README): Instructions on generating types with protobuf * proto: regenerare protos wth binary v0.12.1-alpha * feat: use poetry instead of pipenv b/c it's objectively better * ci: Use poetry for the test workflow. Handle concurrency. Add cacheing. commit bba204296ef2f01d137af0acfd3654920b8262ac Author: Unique-Divine <[email protected]> Date: Fri Aug 12 02:48:08 2022 -0500 add pytest as a non-dev dependency commit bd7f20f1d45ea5ee0e84187f63aec78f7d08f9f4 Author: Unique-Divine <[email protected]> Date: Fri Aug 12 02:43:29 2022 -0500 ci: pytest workflow with poetry first attemp #wip * ci: base branch is called master, not main * forgot to set repo secrets for the env vars * fix: Remove maintenance margin ratio from perp query * refactor: remvoe maintenance margin ratio comment * refactor(pytests): cleanup for PR comments * refactor(chain_info_test): revert network name change * refactor(protocgen.sh): simiply using suggestion from KY Co-authored-by: matthiasmatt <[email protected]>
- Loading branch information
1 parent
bc89a92
commit c1063ac
Showing
271 changed files
with
14,451 additions
and
20,215 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,39 +1,61 @@ | ||
name: Run tests | ||
|
||
on: [push] | ||
on: | ||
pull_request: | ||
branches: ["master"] | ||
push: | ||
branches: ["master"] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | ||
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }} | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
env: | ||
# https://www.notion.so/nibiru/Resources-and-Repo-Configs-b31aa8074a2b419d80b0c946ed5efab0 | ||
CHAIN_ID: ${{ secrets.CHAIN_ID }} | ||
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }} | ||
HOST: ${{ secrets.HOST }} | ||
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }} | ||
GRPC_PORT: ${{ secrets.GRPC_PORT }} | ||
LCD_PORT: ${{ secrets.LCD_PORT }} | ||
steps: | ||
# ---------------------------------------------- | ||
# check-out repo and set-up python | ||
# ---------------------------------------------- | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9.13 | ||
|
||
- name: Run python | ||
run: python --version && python -c "print('hello')" | ||
|
||
- name: Install pipenv with pip | ||
run: pip install pipenv | ||
|
||
- id: cache-pipenv | ||
uses: actions/cache@v1 | ||
# ---------------------------------------------- | ||
# Install & configure poetry | ||
# ---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
path: ~/.local/share/virtualenvs | ||
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | ||
|
||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cache-pipenv.outputs.cache-hit != 'true' | ||
run: | | ||
pipenv install --dev | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
- name: Run Python SDK tests | ||
run: pipenv run pytest -p no:warnings | ||
run: poetry run pytest -p no:warnings |
This file was deleted.
Oops, something went wrong.
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
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,4 +1,4 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) | ||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 +1,4 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
Oops, something went wrong.