Skip to content

Commit

Permalink
Create python-package.yml (#2)
Browse files Browse the repository at this point in the history
* Create python-package.yml

* add test

* update

* update

* update
  • Loading branch information
aniketmaurya authored Oct 9, 2024
1 parent c642edf commit 5d4d2ea
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 5d4d2ea

Please sign in to comment.