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

View file

@ -90,20 +90,7 @@ docs = [
"Pygments~=2.13.0", "Pygments~=2.13.0",
"sphinxcontrib-towncrier~=0.3.1a3", "sphinxcontrib-towncrier~=0.3.1a3",
] ]
dev = [
[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 = [
"black~=22.8", "black~=22.8",
"isort~=5.11", "isort~=5.11",
"ruff~=0.0.215", "ruff~=0.0.215",
@ -113,6 +100,20 @@ dependencies = [
"packaging~=21.3", "packaging~=21.3",
"typing-extensions~=4.3.0", "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 = [ post-install-commands = [
"pre-commit install", "pre-commit install",
] ]
@ -138,6 +139,7 @@ serve = "sphinx-autobuild --watch aiogram/ --watch CHANGELOG.rst --watch README.
[tool.hatch.envs.dev] [tool.hatch.envs.dev]
python = "3.10" python = "3.10"
features = [ features = [
"dev",
"fast", "fast",
"redis", "redis",
"proxy", "proxy",