Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slymit committed Sep 15, 2023
1 parent 10af9e9 commit 0a302bc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test python package

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
test:
name: ${{ matrix.tox_env }}
runs-on: ubuntu-latest

services:
redis:
image: redis:latest
ports:
- 6379:6379
options: >-
--health-cmd="redis-cli ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
strategy:
fail-fast: false
matrix:
include:
- python: '3.7'
tox_env: 'py37'
- python: '3.8'
tox_env: 'py38'
- python: '3.9'
tox_env: 'py39'
- python: '3.10'
tox_env: 'py310'
- python: '3.11'
tox_env: 'py311'

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- run: pip install tox
- run: tox -e ${{ matrix.tox_env }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'dev': [
'pytest==7.4.2',
'packaging==23.1',
'coverage==7.3.1',
'coverage>=7.2.7',
'flake8',
'restructuredtext-lint',
],
Expand Down
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
minversion = 4.8.0
envlist = {py37,py38,py39,py310,py311}

[testenv]
allowlist_externals = make
usedevelop = true
extras =
dev
commands =
make coverage ARGS='-x -vv'

0 comments on commit 0a302bc

Please sign in to comment.