Skip to content

Drop 2.7 tests and avoid Cython warning #671

Drop 2.7 tests and avoid Cython warning

Drop 2.7 tests and avoid Cython warning #671

Workflow file for this run

name: coverage-lint
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
tests:
name: Coverage and Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/[email protected]
with:
python-version: 3.8
- name: Install from source
run: |
pip install --upgrade pip setuptools wheel
pip install .[all]
- name: Lint
run: flake8 src/h3 setup.py tests
- name: Pylint
# As a test for visibility of API bindings, we want to ensure that pylint has no
# `import-error` warnings for h3 imports.
run: pylint --disable=all --enable=import-error tests/
- name: Coverage
run: |
pip install Cython
cythonize -i tests/cython_example.pyx
pytest --cov=h3 --full-trace --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./coverage.xml
fail_ci_if_error: true
- name: Copy Cython annotations to project dir
run: |
mkdir annotations
cp _skbuild/*/cmake-build/src/h3/_cy/*.html ./annotations
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v3
with:
path: ./annotations