Skip to content

Commit c2b9c7b

Browse files
test: GHA workflow, v0.0.3, Etherscan, CoinMarketCap, and FTMScan (#2)
* Init python workflow with miniconda3 container * test: release patch v0.0.2 and fix CI action * test: etherscan tests passing with pro or on-pro API key * fix: everything work as expected outside of Messari and DefiLlama * ci: add more credentials to repo secrets
1 parent c8f577c commit c2b9c7b

File tree

13 files changed

+1727
-167
lines changed

13 files changed

+1727
-167
lines changed

.github/workflows/all-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Pytests 🐍
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
tests:
9+
runs-on: ubuntu-20.04 # ubuntu-latest
10+
env:
11+
# API Keys
12+
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
13+
FTMSCAN_API_KEY: ${{ secrets.FTMSCAN_API_KEY }}
14+
COINMARKETCAP_API_KEY: ${{ secrets.COINMARKETCAP_API_KEY }}
15+
MESSARI_API_KEY: ${{ secrets.MESSARI_API_KEY }}
16+
# Publishing to PyPI
17+
PYPI_USER: ${{ secrets.PYPI_USER }}
18+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
19+
steps:
20+
- name: Check out the repo
21+
uses: actions/checkout@v3
22+
- name: Set up Python 3.9
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.9.13
26+
- name: Install Poetry
27+
uses: snok/install-poetry@v1
28+
with:
29+
virtualenvs-create: true
30+
virtualenvs-in-project: true
31+
installer-parallel: true
32+
- name: Load cached venv
33+
id: cached-poetry-dependencies
34+
uses: actions/cache@v2
35+
with:
36+
path: .venv
37+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
38+
- name: Install dependencies
39+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
40+
run: poetry install --no-interaction --no-root
41+
- name: Test with pytest
42+
run: |
43+
poetry run pytest --verbose -p no:warnings -k 'not DeFiLlama and not Messari'

0 commit comments

Comments
 (0)