# 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: Python package on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: 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: | curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - $HOME/.poetry/bin/poetry install --extras ci - name: Lint with flake8 and black run: | $HOME/.poetry/bin/poetry run flake8 . --count --statistics --show-source --ignore=E501,W503,W605,E722 $HOME/.poetry/bin/poetry run black . --check - name: Test with pytest run: | $HOME/.poetry/bin/poetry run pytest --cov hbmqtt --cov tests --cov-report=term --cov-report=xml - name: Upload coverage data to coveralls.io run: | $HOME/.poetry/bin/poetry run coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}