Files
pycapnp/.github/workflows/packagingtest.yml
Madhava Jay 9c4f80ad21 Fixed linting issues
- re-enabled lint checks
2022-05-24 11:42:53 +10:00

50 lines
1.5 KiB
YAML

name: Packaging Test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
fail-fast: false
matrix:
# Some asyncio commands require 3.7+
# It may be possible to use 3.6 and maybe 3.5; however, this will take some patching to get examples to work
python-version: [3.7, 3.8, 3.9, "3.10"]
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build pycapnp and install
run: |
python setup.py build
pip install .
- name: Lint with flake8 and check black
run: |
pip install black flake8
flake8 . --filename '*.py,*.pyx,*.pxd' --count --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx
flake8 . --count --show-source --statistics --exclude benchmark,build
black . --check --diff --color
- name: Packaging
run: |
python setup.py bdist_wheel
python setup.py sdist
- uses: actions/upload-artifact@v1.0.0
with:
name: package_dist
path: dist
- name: Test with pytest
run: |
pip install pytest
pytest