2021-09-23 20:41:10 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2022-02-12 17:58:10 +00:00
|
|
|
no_cython_install:
|
|
|
|
name: "Test install with generated cython files"
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: "actions/checkout@v2"
|
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install pytest hypothesis pandas mypy rapidfuzz_capi Cython==3.0.0a10
|
|
|
|
|
|
|
|
- name: Generate cython
|
|
|
|
run: |
|
|
|
|
chmod +x ./src/cython/generate.sh
|
|
|
|
./src/cython/generate.sh
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
run: |
|
|
|
|
pip install build; python -m build --sdist
|
|
|
|
# test whether tarball contains all files required for compiling
|
|
|
|
pip install dist/rapidfuzz-*.tar.gz
|
|
|
|
|
2021-09-23 20:41:10 +00:00
|
|
|
tests:
|
|
|
|
name: "Python ${{ matrix.python-version }}"
|
2022-02-12 17:58:10 +00:00
|
|
|
runs-on: ${{matrix.os}}
|
2021-09-23 20:41:10 +00:00
|
|
|
strategy:
|
2022-02-11 19:50:52 +00:00
|
|
|
fail-fast: false
|
2021-09-23 20:41:10 +00:00
|
|
|
matrix:
|
2021-12-19 14:47:05 +00:00
|
|
|
python-version: ["3.6", "3.9", "3.10"]
|
2021-09-23 20:41:10 +00:00
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: "actions/checkout@v2"
|
|
|
|
with:
|
|
|
|
submodules: 'true'
|
|
|
|
- uses: "actions/setup-python@v2"
|
|
|
|
with:
|
|
|
|
python-version: "${{ matrix.python-version }}"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2022-02-11 19:50:52 +00:00
|
|
|
pip install pytest hypothesis pandas mypy
|
2021-09-23 20:41:10 +00:00
|
|
|
|
|
|
|
- name: build
|
|
|
|
run: |
|
2022-02-12 17:58:10 +00:00
|
|
|
pip install .
|
2021-09-23 20:41:10 +00:00
|
|
|
|
2022-02-11 19:50:52 +00:00
|
|
|
- name: Test type stubs
|
|
|
|
if: matrix.python-version != '3.6'
|
|
|
|
run: |
|
|
|
|
python -m mypy.stubtest rapidfuzz --ignore-missing-stub
|
|
|
|
|
2022-02-19 15:43:06 +00:00
|
|
|
- name: Test with pytest and backtrace in case of SegFault
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
tools/seg_wrapper.sh pytest tests
|
2021-09-23 20:41:10 +00:00
|
|
|
- name: Test with pytest
|
2022-02-19 15:43:06 +00:00
|
|
|
if: runner.os != 'Linux'
|
2021-09-23 20:41:10 +00:00
|
|
|
run: |
|
|
|
|
pytest tests
|