Skip to content

Commit 1f7c3bd

Browse files
committed
Merge branch 'release/0.0.1'
2 parents 3402e23 + 835ae10 commit 1f7c3bd

File tree

8 files changed

+712
-24
lines changed

8 files changed

+712
-24
lines changed

.github/workflows/release.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release python package
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.9"
17+
- name: Install deps
18+
uses: knowsuchagency/poetry-install@v1
19+
env:
20+
POETRY_VIRTUALENVS_CREATE: false
21+
- name: Release package
22+
env:
23+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
24+
run: poetry publish --build

.github/workflows/test.yml

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Testing taskiq-redis
2+
3+
on: push
4+
5+
jobs:
6+
black:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: "3.9"
14+
- name: Install deps
15+
uses: knowsuchagency/poetry-install@v1
16+
env:
17+
POETRY_VIRTUALENVS_CREATE: false
18+
- name: Run black check
19+
run: poetry run black --check .
20+
flake8:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: "3.9"
28+
- name: Install deps
29+
uses: knowsuchagency/poetry-install@v1
30+
env:
31+
POETRY_VIRTUALENVS_CREATE: false
32+
- name: Run flake8 check
33+
run: poetry run flake8 --count .
34+
mypy:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Set up Python
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: "3.9"
42+
- name: Install deps
43+
uses: knowsuchagency/poetry-install@v1
44+
env:
45+
POETRY_VIRTUALENVS_CREATE: false
46+
- name: Run mypy check
47+
run: poetry run mypy .
48+
pytest:
49+
services:
50+
redis:
51+
image: bitnami/redis:6.2.5
52+
env:
53+
ALLOW_EMPTY_PASSWORD: "yes"
54+
options: >-
55+
--health-cmd="redis-cli ping"
56+
--health-interval=5s
57+
--health-timeout=5s
58+
--health-retries=30
59+
ports:
60+
- 6379:6379
61+
strategy:
62+
matrix:
63+
py_version: ["3.7", "3.8", "3.9", "3.10"]
64+
runs-on: "ubuntu-latest"
65+
steps:
66+
- uses: actions/checkout@v2
67+
- name: Set up Python
68+
uses: actions/setup-python@v2
69+
with:
70+
python-version: "${{ matrix.py_version }}"
71+
- name: Update pip
72+
run: python -m pip install -U pip
73+
- name: Install poetry
74+
run: python -m pip install poetry
75+
- name: Install deps
76+
run: poetry install
77+
env:
78+
POETRY_VIRTUALENVS_CREATE: false
79+
- name: Run pytest check
80+
run: poetry run pytest -vv -n auto --cov="taskiq_redis" .

.pre-commit-config.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v2.4.0
6+
hooks:
7+
- id: check-ast
8+
- id: trailing-whitespace
9+
- id: check-toml
10+
- id: end-of-file-fixer
11+
12+
- repo: https://github.com/asottile/add-trailing-comma
13+
rev: v2.1.0
14+
hooks:
15+
- id: add-trailing-comma
16+
17+
- repo: local
18+
hooks:
19+
- id: black
20+
name: Format with Black
21+
entry: black
22+
language: system
23+
types: [python]
24+
25+
- id: autoflake
26+
name: autoflake
27+
entry: autoflake
28+
language: system
29+
types: [ python ]
30+
args: [ --in-place, --remove-all-unused-imports, --remove-duplicate-keys ]
31+
32+
- id: isort
33+
name: isort
34+
entry: isort
35+
language: system
36+
types: [ python ]
37+
38+
- id: flake8
39+
name: Check with Flake8
40+
entry: flake8
41+
language: system
42+
pass_filenames: false
43+
types: [ python ]
44+
args: [--count, .]
45+
46+
- id: mypy
47+
name: Validate types with MyPy
48+
entry: mypy
49+
language: system
50+
types: [ python ]
51+
52+
- id: yesqa
53+
name: Remove usless noqa
54+
entry: yesqa
55+
language: system
56+
types: [ python ]

0 commit comments

Comments
 (0)