Skip to content

Commit

Permalink
V0.1 (#2)
Browse files Browse the repository at this point in the history
v0.1
  • Loading branch information
KissPeter committed Feb 5, 2022
1 parent 2db669f commit 35ba0f3
Show file tree
Hide file tree
Showing 30 changed files with 1,819 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[run]
concurrency=multiprocessing
branch = True

[report]
omit =
/usr/*
*/.local/*

[paths]
source=
redis_batch/
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = lf
max_line_length = 88
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 88
ignore = E203,W503,B008
select = C,E,F,W,B
copyright-check = False
58 changes: 58 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
push:
branches:
- '**'
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest] # , macos-latest, windows-latest
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.8' ]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f redis_streams_test/requirements_for_test.txt ]; then pip install -r redis_streams_test/requirements_for_test.txt; fi
- name: Lint
run: |
flake8 redis_streams/
black redis_streams/
mypy --install-types --non-interactive redis_streams/
mypy --explicit-package-bases --namespace-packages redis_streams/
vulture --min-confidence 100 redis_streams/
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 'latest'
- run: redis-cli ping
- name: Test
run: |
pytest -x --cov-report term --cov=redis_streams --durations=10 --show-capture=stdout -vv -rP --random-order --html=pytest_report.html --self-contained-html redis_streams_test
coverage html
- uses: actions/upload-artifact@v2
with:
name: Coverage-${{ matrix.python-version }}
path: ./htmlcov
- uses: actions/upload-artifact@v2
with:
name: Pytest-Report-${{ matrix.python-version }}
path: pytest_report.html

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,8 @@ dmypy.json

# Pyre type checker
.pyre/

# custom

/tmp/
/.idea/
Loading

0 comments on commit 35ba0f3

Please sign in to comment.