mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 04:46:25 +08:00
👷 fix python ci cache path error (#1012)
* 👷 fix python ci cache path error * 🐛 fix path error * ✏️ fix typo
This commit is contained in:
parent
6cfa21b15c
commit
ae21bfdd0e
11
.github/actions/setup-python/action.yml
vendored
11
.github/actions/setup-python/action.yml
vendored
@ -10,17 +10,22 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v2
|
- id: python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ inputs.python-version }}
|
python-version: ${{ inputs.python-version }}
|
||||||
architecture: "x64"
|
architecture: "x64"
|
||||||
|
|
||||||
- uses: Gr1N/setup-poetry@v7
|
- uses: Gr1N/setup-poetry@v7
|
||||||
|
|
||||||
|
- id: poetry-cache
|
||||||
|
run: echo "::set-output name=dir::$(poetry config virtualenvs.path)"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pypoetry/virtualenvs
|
path: ${{ steps.poetry-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
key: ${{ runner.os }}-poetry-${{ steps.python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
|
|
||||||
- run: poetry install -E all
|
- run: poetry install -E all
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -22,7 +22,10 @@ async def test_load_plugin(app: App, load_plugin: Set["Plugin"]):
|
|||||||
assert "plugins.export" in sys.modules
|
assert "plugins.export" in sys.modules
|
||||||
|
|
||||||
# check sub plugin
|
# check sub plugin
|
||||||
|
plugin = nonebot.get_plugin("nested_subplugin")
|
||||||
|
assert plugin
|
||||||
assert "plugins.nested.plugins.nested_subplugin" in sys.modules
|
assert "plugins.nested.plugins.nested_subplugin" in sys.modules
|
||||||
|
assert plugin.parent_plugin == nonebot.get_plugin("nested")
|
||||||
|
|
||||||
# check load again
|
# check load again
|
||||||
with pytest.raises(RuntimeError):
|
with pytest.raises(RuntimeError):
|
||||||
|
Loading…
Reference in New Issue
Block a user