diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..89b01d5 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/setup.py b/setup.py index b8875ed..494b9ba 100644 --- a/setup.py +++ b/setup.py @@ -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'], diff --git a/testpy/testsamples.py b/testpy/testsamples.py index 0f8a199..5cdb64f 100644 --- a/testpy/testsamples.py +++ b/testpy/testsamples.py @@ -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() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2efd380 --- /dev/null +++ b/tox.ini @@ -0,0 +1,3 @@ +[testenv] +commands = + python testpy/testsamples.py \ No newline at end of file