Skip to content

Commit 02ad2c9

Browse files
authored
Merge pull request #7 from pyth-network/feat/gh_action_tests
Add pytest Github Action
2 parents 860d01f + aa522ec commit 02ad2c9

File tree

5 files changed

+36
-20
lines changed

5 files changed

+36
-20
lines changed

.github/workflows/docker-image.yml

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
tags:
88
- "v*"
99

10-
pull_request:
11-
branches:
12-
- "main"
13-
1410
jobs:
1511
docker:
1612
runs-on: ubuntu-latest

.github/workflows/pytest.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pytest
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.7", "3.8", "3.9"]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install flake8
25+
26+
- name: Lint with flake8
27+
run: |
28+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30+
31+
- name: Test with pytest
32+
run: |
33+
pytest

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Pyth Client in Python
22
=====================
33

4+
[![pytest](https://github.com/pyth-network/pyth-client-py/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/pyth-network/pyth-client-py/actions/workflows/pytest.yml)
5+
46
A Python library to retrieve data from Pyth account structures off the Solana blockchain.
57

68
**NOTE**: This library requires Python 3.7 or greater due to `from __future__ import annotations`.

requirements.txt

-15
This file was deleted.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup
22

3-
requirements = ['aiodns', 'aiohttp', 'backoff', 'base58', 'loguru']
3+
requirements = ['aiodns', 'aiohttp>=3.7.4', 'backoff', 'base58', 'loguru']
44

55
setup(
66
name='pythclient',

0 commit comments

Comments
 (0)