.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: ci

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

jobs:
  build:

    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
    env:
      OS: ${{ matrix.os }}
      PYTHON: ${{ matrix.python-version }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-18.04, ubuntu-20.04]
        python-version: [3.6, 3.7, 3.8, 3.9]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip wheel
        sudo apt-get install -y libnanomsg-dev libdatrie-dev
        pip install Cython tox coverage
        pip install git+https://github.com/freepn/nanomsg-python@1.0.2-4#egg=nanomsg
        pip install .
        pwd && ls -l
    - name: Test with tox
      run: |
        tox -e py
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1
      with:
        env_vars: OS,PYTHON
    - name: Deploy with tox
      run: |
        tox -e deploy