Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

ci: update test script #1

Merged
merged 11 commits into from
Aug 8, 2024
19 changes: 10 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# this file is *not* meant to cover or endorse the use of GitHub Actions, but rather to
# help test this project

name: Test

on: [push, pull_request]
on:
pull_request:
push:
branches:
- 'main'

jobs:
test:
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10']
python: ['3.11', '3.12']
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install test dependencies
run: python -m pip install -U tox
run: python -m pip install ".[test]"
- name: Test
run: python -m tox -e py
run: pytest
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ readme = "README.md" # Optional
# 'Programming Language' classifiers above, 'pip install' will check this
# and refuse to install the project if the version does not match. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
requires-python = ">=3.7"
requires-python = ">=3.11"

license = {file = "LICENSE"}

Expand Down Expand Up @@ -68,11 +68,8 @@ classifiers = [ # Optional
# that you indicate you support Python 3. These classifiers are *not*
# checked by "pip install". See instead "python_requires" below.
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"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",
"Programming Language :: Python :: 3 :: Only",
]

Expand All @@ -90,8 +87,10 @@ dependencies = [ # Optional
# Similar to `dependencies` above, these must be valid existing
# projects.
[project.optional-dependencies] # Optional
dev = ["check-manifest"]
test = ["coverage"]
test = [
"coverage",
"pytest"
]

# List URLs that are relevant to your project
#
Expand Down
2 changes: 2 additions & 0 deletions tests/test_stub.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_placeholder():
assert True