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 ea9bb47
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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'

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 }}
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.10.0
envlist = {py37,py38,py39,py310}

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

0 comments on commit ea9bb47

Please sign in to comment.