Skip to content

Commit 8fb9f51

Browse files
committed
Added docs. (#45)
Signed-off-by: Pavel Kirilin <[email protected]>
1 parent 37f41b3 commit 8fb9f51

31 files changed

+6226
-582
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,41 @@ on:
66
- "*"
77

88
jobs:
9+
deploy_docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Install dependencies
14+
uses: borales/[email protected]
15+
with:
16+
cmd: install # will run `yarn install` command
17+
- name: Build docs
18+
uses: borales/[email protected]
19+
with:
20+
cmd: docs:build -d docs_dist # will run `docs:build -d docs_dist` command
21+
- name: Setup git
22+
run: |
23+
git config --global lfs.allowincompletepush true
24+
- name: Deploy
25+
uses: peaceiris/actions-gh-pages@v3
26+
with:
27+
personal_token: ${{ secrets.PERSONAL_TOKEN }}
28+
external_repository: taskiq-python/taskiq-python.github.io
29+
publish_dir: ./docs_dist
30+
user_name: 'github-actions[bot]'
31+
user_email: 'github-actions[bot]@users.noreply.github.com'
932
deploy:
1033
runs-on: ubuntu-latest
1134
steps:
1235
- uses: actions/checkout@v2
36+
- name: Install poetry
37+
run: pipx install poetry
1338
- name: Set up Python
14-
uses: actions/setup-python@v2
39+
uses: actions/setup-python@v4
1540
with:
1641
python-version: "3.9"
1742
- name: Install deps
18-
uses: knowsuchagency/poetry-install@v1
19-
env:
20-
POETRY_VIRTUALENVS_CREATE: false
43+
run: poetry install
2144
- name: Release package
2245
env:
2346
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 21 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,29 @@ name: Testing taskiq
33
on: push
44

55
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:
6+
lint:
7+
strategy:
8+
matrix:
9+
cmd:
10+
- black
11+
- flake8
12+
- isort
13+
- mypy
14+
- autoflake
3515
runs-on: ubuntu-latest
3616
steps:
3717
- uses: actions/checkout@v2
18+
- name: Install poetry
19+
run: pipx install poetry
3820
- name: Set up Python
39-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v4
4022
with:
4123
python-version: "3.9"
24+
cache: 'poetry'
4225
- 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 .
26+
run: poetry install
27+
- name: Run lint check
28+
run: poetry run pre-commit run -a ${{ matrix.cmd }}
4829
pytest:
4930
permissions:
5031
checks: write
@@ -57,22 +38,19 @@ jobs:
5738
runs-on: "${{ matrix.os }}"
5839
steps:
5940
- uses: actions/checkout@v2
41+
- name: Install poetry
42+
run: pipx install poetry
6043
- name: Set up Python
61-
uses: actions/setup-python@v2
44+
uses: actions/setup-python@v4
6245
with:
6346
python-version: "${{ matrix.py_version }}"
64-
- name: Update pip
65-
run: python -m pip install -U pip
66-
- name: Install poetry
67-
run: python -m pip install poetry
47+
cache: 'poetry'
6848
- name: Install deps
6949
run: poetry install
70-
env:
71-
POETRY_VIRTUALENVS_CREATE: false
7250
- name: Run pytest check
7351
run: poetry run pytest -vv -n auto --cov="taskiq" .
7452
- name: Generate report
75-
run: coverage xml
53+
run: poetry run coverage xml
7654
- name: Upload coverage reports to Codecov with GitHub Action
7755
uses: codecov/codecov-action@v3
7856
if: matrix.os == 'ubuntu-latest' && matrix.py_version == '3.9'

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,8 @@ cython_debug/
160160
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161161
.idea/
162162
.vscode/
163+
164+
## For docs
165+
node_modules
166+
.temp
167+
.cache

0 commit comments

Comments
 (0)