Change dependencies

This commit is contained in:
Alex Root Junior 2023-01-08 21:57:48 +02:00
parent 0de0e2b6ba
commit b191122db7
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
2 changed files with 28 additions and 25 deletions

View file

@ -64,28 +64,23 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup redis
if: ${{ env.IS_WINDOWS == 'false' }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 6
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Load cached venv
id: cached-pip-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ secrets.CACHE_VERSION }}
path: ${{ env.pythonLocation }}
key: ${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ secrets.CACHE_VERSION }}
- name: Install project dependencies
if: steps.cached-pip-dependencies.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
extras="redis,proxy,i18n,test"
extras="dev,test,redis,proxy,i18n"
[[ "$IS_PYPY" == "false" ]] && extras="$extras,fast"
pip install -e .[$extras]
.venv/bin/pip install -e .[$extras]
- name: Lint code
if: "env.IS_PYPY == 'false'"
@ -94,6 +89,12 @@ jobs:
mypy aiogram
black --check --diff aiogram tests
- name: Setup redis
if: ${{ env.IS_WINDOWS == 'false' }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 6
- name: Run tests
run: |
flags=""

View file

@ -90,20 +90,7 @@ docs = [
"Pygments~=2.13.0",
"sphinxcontrib-towncrier~=0.3.1a3",
]
[project.urls]
Homepage = "https://aiogram.dev/"
Documentation = "https://docs.aiogram.dev/"
Repository = "https://github.com/aiogram/aiogram/"
[tool.hatch.envs.default]
features = [
"fast",
"redis",
"proxy",
"i18n",
]
dependencies = [
dev = [
"black~=22.8",
"isort~=5.11",
"ruff~=0.0.215",
@ -113,6 +100,20 @@ dependencies = [
"packaging~=21.3",
"typing-extensions~=4.3.0",
]
[project.urls]
Homepage = "https://aiogram.dev/"
Documentation = "https://docs.aiogram.dev/"
Repository = "https://github.com/aiogram/aiogram/"
[tool.hatch.envs.default]
features = [
"dev",
"fast",
"redis",
"proxy",
"i18n",
]
post-install-commands = [
"pre-commit install",
]
@ -138,6 +139,7 @@ serve = "sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.
[tool.hatch.envs.dev]
python = "3.10"
features = [
"dev",
"fast",
"redis",
"proxy",