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 Python CI #398

Open
wants to merge 3 commits 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
42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Test

on:
pull_request:
push:
branches: [master, 'test-me-*']
tags: ['*']

jobs:
build-py:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-20.04]
include:
- { os: "windows-latest" , python-version: "3.8" }
- { os: "windows-latest" , python-version: "3.12" }

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != '2.7'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install python2-dev
if: matrix.python-version == '2.7'
run: sudo apt-get install python2-dev

- name: Switch to Python 2.7
if: matrix.python-version == '2.7'
run: sudo ln -sf /usr/bin/python2.7 /usr/bin/python && curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py | python

- name: Install dependencies
run: python -m pip install -U tox

- name: Tox tests
run: tox -e py
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def build(self):
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'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',
],
keywords='rules engine rete forward chaining event stream state machine workflow streaming analytics',
packages = ['durable'],
Expand Down
2 changes: 1 addition & 1 deletion testpy/testsamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def try_multi_thread_test(thread_number):
threads = list()

for i in range(5):
t = threading.Thread(target=try_multi_thread_test, args=(i,), daemon=True)
t = threading.Thread(target=try_multi_thread_test, args=(i,))
threads.append(t)
t.start()

Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[testenv]
commands =
python testpy/testsamples.py