Skip to content

Ensure single thread send data at a time. #17

Ensure single thread send data at a time.

Ensure single thread send data at a time. #17

Workflow file for this run

name: Run tests
on: [push]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
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 poetry
uses: snok/install-poetry@v1.1.6
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache venv
id: cached-pip-wheels
uses: actions/cache@v2
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction
- name: Run pytest and coverage
run: poetry run coverage run --source=secsgem -m pytest tests secsgem --doctest-modules
- name: Publish coverage to codeclimate
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }}
with:
coverageCommand: poetry run coverage xml
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
- name: Lint with prospector
run: poetry run prospector --no-autodetect --output-format=pylint secsgem
release:
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install poetry
uses: snok/install-poetry@v1.1.6
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.7
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
ignore_dev_requirements: "yes"