Skip to content

Update type comparisons which were highlighted by the linter #478

Update type comparisons which were highlighted by the linter

Update type comparisons which were highlighted by the linter #478

Workflow file for this run

name: Style, Unit And Integration Tests
on:
push:
branches:
- "**"
tags-ignore:
- "**"
jobs:
test-style:
name: Code style check on ${{ matrix.os }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python: ['3.8']
os: ['ubuntu-latest']
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Install required packages
run: pip3 install pre-commit
- name: Install pre-commit hooks
run: pre-commit install --install-hooks
- name: Run pre-commit hooks
run: pre-commit run --all-files
test-unit-and-integration:
name: Unit and Integration tests with Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9']
librdkafka: ['1.7.0']
steps:
- uses: actions/checkout@v2
- name: Fetch virtualenv cache
uses: actions/cache@v1
id: venv-cache
with:
path: .venv
key: venv-${{ matrix.python }}-${{ hashFiles('poetry.lock') }}
- name: Setup python and install packages
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Install and configure poetry
run: |
pip3 install "poetry>=1.0.2"
poetry config virtualenvs.in-project true
- name: Install esque requirements
run: |
poetry install -vvv
- name: Run kafka stack
run: |
docker-compose up -d
./scripts/wait-for-it.sh localhost:9092 -t 60
./scripts/wait-for-it.sh localhost:2181 -t 60
./scripts/wait-for-it.sh localhost:8081 -t 60
sleep 5
- name: Run integration tests
run: |
poetry run pytest -v --integration --local --cov=esque tests/
- name: Update coverage
if: matrix.python == '3.8'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
export BRANCH_NAME="${GITHUB_REF#refs/heads/}"
poetry run coveralls
- name: Output logs
if: failure()
run: |
docker-compose logs kafka
docker-compose logs zookeeper