Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

fix: poetry version bump (#29) #72

fix: poetry version bump (#29)

fix: poetry version bump (#29) #72

Workflow file for this run

name: 🐍 tests
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
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:
# https://www.notion.so/nibiru/Resources-and-Repo-Configs-b31aa8074a2b419d80b0c946ed5efab0
CHAIN_ID: ${{ secrets.CHAIN_ID }}
HOST: ${{ secrets.HOST }}
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }}
ORACLE_MNEMONIC: ${{ secrets.ORACLE_MNEMONIC }}
GRPC_PORT: ${{ secrets.GRPC_PORT }}
LCD_PORT: ${{ secrets.LCD_PORT }}
NETWORK_INSECURE: ${{ secrets.NETWORK_INSECURE }}
steps:
# ----------------------------------------------
# check-out repo and set-up python
# ----------------------------------------------
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Python 3.8
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Run python
run: python --version && python -c "print('hello')"
# ----------------------------------------------
# Try to load a cached poetry binary
# See https://github.com/snok/install-poetry#caching-the-poetry-installation for the source
# ----------------------------------------------
- name: Load cached Poetry installation
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-0 # increment to reset cache
# ----------------------------------------------
# Install & configure poetry
# ----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
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.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# run tests
#----------------------------------------------
- name: Run Python SDK tests
run: poetry run pytest -s