Skip to content

Colab notebook testing #204

Colab notebook testing

Colab notebook testing #204

name: Colab notebook testing
on:
schedule:
- cron: "0 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
jobs:
tests:
runs-on: ubuntu-latest
# `jobs.<job_id>.defaults`:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun
defaults:
run:
working-directory: "pysdk"
env:
# https://www.notion.so/nibiru/Resources-and-Repo-Configs-b31aa8074a2b419d80b0c946ed5efab0
DEVNET_NUMBER: ${{ secrets.DEVNET_NUMBER }}
VALIDATOR_MNEMONIC: ${{ secrets.VALIDATOR_MNEMONIC }}
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@v2
with:
python-version: 3.8.16
# 3.8.16 is the highest version available for this GitHub action.
# For the full list of supported Python versions, see:
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
# 3.8.16 is the highest 3.8 version available on pyenv
# See `grep '3.8' <<< $(pyenv install -l)` to view the available list.
- name: Run python
run: python --version && python -c "print('hello')"
#----------------------------------------------
# run examples
#----------------------------------------------
- name: Run the examples
run: |
pip install jupyter
pip install nibiru
cd examples
jupyter nbconvert --to python colab_notebook.ipynb
python colab_notebook.py || exit 1