Skip to content

WIP: Implement IPC with ZMQ #471

WIP: Implement IPC with ZMQ

WIP: Implement IPC with ZMQ #471

Workflow file for this run

name: Python testing
on:
pull_request:
branches:
- main
- dev
- redis
push:
branches:
- main
- dev
- redis
jobs:
test:
runs-on: ${{matrix.os}}
strategy:
max-parallel: 1
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest] # [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update Ubuntu and Install Dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y lsb-release curl gpg
- name: Fetch Redis gpg (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
- name: Configure Redis gpg (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
- name: Install Redis (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y redis && sleep 5 && sudo systemctl stop redis-server
- name: Install Redis (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew install redis
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
- name: Install package (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
pip install -e .[tests,lint]
- name: Install package (Mac)
if: startsWith(matrix.os, 'macos')
run: |
pip install -e .[tests,lint]
- name: Test with pytest
run: |
python -m pytest -s -l --cov=improv
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
parallel: true
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install package (Ubuntu)
run: |
pip install -e .[lint]
- name: Check format with Black
uses: psf/black@stable
- name: Check format with flake8
run: |
pip install flake8
flake8
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v1
with:
parallel-finished: true