Skip to content

Fix/get token account balance #180

Fix/get token account balance

Fix/get token account balance #180

Workflow file for this run

name: Checks
on: pull_request
jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11']
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#-----------------------------------------------
# try to load cached poetry installation
#-----------------------------------------------
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local # the path depends on the OS
key: poetry-1.4.0-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
version: 1.4.0
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@v4
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
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
# build the project
#----------------------------------------------
- name: Build & Install project with pip
run: |
poetry build
pip install dist/*.whl
#----------------------------------------------
# run black
#----------------------------------------------
- name: Run Black
run: poetry run black --check .
#----------------------------------------------
# run mypy
#----------------------------------------------
- name: Run Mypy
run: poetry run mypy .
#----------------------------------------------
# run poetry check
#----------------------------------------------
- name: Run Poetry Check
run: poetry check
#----------------------------------------------
# run flake8
#----------------------------------------------
- name: Run Flake8
run: poetry run flake8 chainbench
#----------------------------------------------
# run isort
#----------------------------------------------
- name: Run Isort
run: poetry run isort --check .
#----------------------------------------------
# run light smoke test (poetry)
#----------------------------------------------
- name: Run Light Smoke Test (poetry)
run: poetry run chainbench start --help
#----------------------------------------------
# run light smoke test (package)
#----------------------------------------------
- name: Run Light Smoke Test (package)
run: chainbench start --help