File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Injective Python Package
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ platform : [linux/amd64]
17+
18+ steps :
19+ # Checkout the repository
20+ - name : Checkout code
21+ uses : actions/checkout@v3
22+
23+ # Install Miniconda
24+ - name : Set up Miniconda
25+ uses : conda-incubator/setup-miniconda@v2
26+ with :
27+ auto-activate-base : false
28+ python-version : 3.11
29+ miniconda-version : " latest" # Required when using architecture
30+ architecture : x86_64 # Ensure x86_64 architecture is used
31+ activate-environment : test-env
32+
33+ # Create conda environment and install injective-py from conda-forge
34+ - name : Create conda environment and install injective-py
35+ run : |
36+ conda create -n test-env python=3.11 -y
37+ source activate test-env
38+ conda install -c conda-forge injective-py -y
39+
40+ # Run the Python script using injective-py, all on a single line
41+ - name : Run Python script using injective-py
42+ run : |
43+ source activate test-env
44+ python -c "import asyncio; from pyinjective.async_client import AsyncClient; from pyinjective.core.network import Network; async def main(): network = Network.testnet(); client = AsyncClient(network); tx_hash = 'D265527E3171C47D01D7EC9B839A95F8F794D4E683F26F5564025961C96EFDDA'; tx_logs = await client.fetch_tx(hash=tx_hash); print(tx_logs); if __name__ == '__main__': asyncio.get_event_loop().run_until_complete(main())"
You can’t perform that action at this time.
0 commit comments