Skip to content
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/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: tests

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

jobs:
tests:
name: "Python ${{ matrix.python-version }} ${{ matrix.os }}"
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: windows-latest
python-version: "2.7"
fail-fast: false

steps:
- uses: "actions/checkout@v2"
with:
submodules: true
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
python -m pip install --upgrade cython

- name: "Rebuild CPP files using Cython"
run: "./update_cpp.sh"

- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox"
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'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 :: Implementation :: CPython',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering :: Information Analysis',
Expand Down
2 changes: 1 addition & 1 deletion src/dawg.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ cdef class BytesDAWG(CompletionDAWG):
self._completer.length(),
b64_decoder_storage
)
results.push_back(string(b64_decoder_storage, key_len))
results.push_back(string(<char*>b64_decoder_storage, key_len))

return results

Expand Down
21 changes: 15 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
[tox]
envlist = py27,py35,py35-locale,py36,py37,py38
envlist = py27,py36,py36-locale,py37,py38,py39,py310

[gh-actions]
python =
2.7: py27
3.6: py36-locale
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv]
changedir = {envtmpdir}
deps =
pytest
commands=
python setup.py install
py.test []
commands =
py.test {toxinidir}/tests {posargs}

[testenv:py35-locale]
basepython = python3.5
[testenv:py36-locale]
basepython = python3.6
setenv =
LC_ALL=C
1 change: 0 additions & 1 deletion update_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#!/bin/sh
cython src/*.pyx src/*.pxd -a --cplus -2