RapidFuzz/.github/workflows/branchbuild.yml

75 lines
1.8 KiB
YAML

name: Build
on:
push:
branches-ignore:
- main
jobs:
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 numpy rapidfuzz_capi Cython==3.0.0a10
- name: Generate cython
run: |
chmod +x ./rapidfuzz/generate.sh
./rapidfuzz/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
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.9", "3.10"]
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
pip install pytest hypothesis pandas mypy
- name: build
run: |
pip install .
- name: Test type stubs
if: matrix.python-version != '3.6'
# prevent import from rapidfuzz
working-directory: .github
run: |
python -m mypy.stubtest rapidfuzz --ignore-missing-stub
- name: Test with pytest and backtrace in case of SegFault
if: runner.os == 'Linux'
run: |
tools/seg_wrapper.sh pytest tests
- name: Test with pytest
if: runner.os != 'Linux'
run: |
pytest tests