-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (47 loc) · 1.9 KB
/
testnet-notebook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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