Skip to content

Commit

Permalink
Run tests with tox in gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptomilk committed Oct 24, 2024
1 parent 2bc0a55 commit 7487843
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Run Python Tests
on:
push:
Expand All @@ -10,16 +11,19 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libkrb5-dev
python3 -m pip install --upgrade pip
pip3 install -e .
- name: Run tests
run: pushd tests; python3 runner.py; popd
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ requires =
tox>=4
env_list = lint, type, 3.9, 3.10, 3.11, 3.12, 3.13

[gh-actions]
python =
3.9: py39
3.10: py310, mypy
3.11: py311, mypy
3.12: py312, mypy
3.13: py313, mypy

[testenv]
description = run unit tests
changedir = tests
Expand Down

0 comments on commit 7487843

Please sign in to comment.