Skip to content

'Refactored by Sourcery' #190

'Refactored by Sourcery'

'Refactored by Sourcery' #190

Workflow file for this run

name: CI Pushes
on: [push, pull_request]
jobs:
Test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
fail-fast: false
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: |
bash ./.github/scripts/install_libiio.sh
bash ./.github/scripts/install_iioemu.sh
sudo apt-get install -y python3-pip python3-setuptools
pip install -r requirements_dev.txt
- name: Test
run: tox -e py
- name: Report coverage
if: matrix.python-version == 3.7
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: coveralls
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
bash ./.github/scripts/install_libiio.sh
bash ./.github/scripts/install_iioemu.sh
sudo apt-get install -y python3-pip python3-setuptools
pip install -r requirements_dev.txt
- name: Test
run: tox -e flake8
Deploy:
runs-on: ubuntu-latest
needs: [Test,Lint]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies and generate package
run: |
bash ./.github/scripts/install_libiio.sh
sudo apt-get install -y python3-pip python3-setuptools
pip install -r requirements_dev.txt
python setup.py sdist
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}