Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub workflow to test with Python 3.7 - 3.12 #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Daily at 12:00 UTC
- cron: "0 12 * * *"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: pipx install poetry

- name: Install dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install

- name: Run tests
run: poetry run pytest
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Utilities']
Expand All @@ -27,13 +29,13 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.7"
python = ">=3.7"

[tool.poetry.dev-dependencies]
flake8 = "^4.0.1"
mypy = "^0.942"
mypy = "^1.4"
pytest = "^7.1.2"
pytest-asyncio = "^0.18.3"
pytest-asyncio = "^0.21.1"
pytest-cov = "^3.0.0"
requests = "^2.26.0"
responses = "^0.20.0"
Expand Down