Skip to content

Clean up gitignore

Clean up gitignore #1

Workflow file for this run

name: Python tests
on:
push:
branches: ["main"]
paths:
- python/**
- babushka-core/src/**
- submodules/**
pull_request:
paths:
- python/**
- babushka-core/src/**
- submodules/**
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
redis:
- 6.2.4
- 7.2.0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install redis
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}
- name: Install protoc
run: |
sudo apt update
sudo apt install protobuf-compiler
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
working-directory: ./python
run: |
python -m pip install --upgrade pip
pip install flake8 isort black
- name: Lint with isort
working-directory: ./python
run: |
isort . --profile black --check --diff
- name: Lint with flake8
working-directory: ./python
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/*
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=12 --max-line-length=127 --statistics --extend-ignore=E230 --exclude=python/pybushka/protobuf,.env/*
- name: Lint with black
working-directory: ./python
run: |
black --target-version py36 --check --diff .
- name: Start redis server
working-directory: ./python
run: redis-server &
- name: Generate protobuf files
working-directory: .
run: |
protoc -Iprotobuf=./babushka-core/src/protobuf/ --python_out=./python/python/pybushka ./babushka-core/src/protobuf/*.proto
- name: Test with pytest
working-directory: ./python
run: |
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
maturin develop --release
pytest --asyncio-mode=auto
lint-rust:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./python