diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..e60dae0 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Run tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest httpx + pip install -e . + - name: Test with pytest + run: | + pytest diff --git a/setup.py b/setup.py index f07cfb6..2a1492b 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,15 @@ from setuptools import setup, find_packages +# Read the requirements from the requirements.txt file +with open("requirements.txt") as f: + requirements = f.read().splitlines() + setup( name="tiny_api", version="0.0.1", packages=find_packages(where="src"), package_dir={"": "src"}, - install_requires=[ - # List your project dependencies here, e.g., 'requests>=2.25.1' - ], + install_requires=requirements, # Use the requirements from the file entry_points={ "console_scripts": [ # Define command-line scripts here, e.g., 'mycommand = tiny_api.module:function'