Skip to content

update test-load.yml #18

update test-load.yml

update test-load.yml #18

Workflow file for this run

name: Test Load Nonebot Plugin
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install UV
run: |
pip install --upgrade pip
pip install uv
uv venv .venv
echo "uv version:"
uv --version
- name: Install dependencies and Run Nonebot
run: |
source .venv/bin/activate
export ENVIRONMENT=dev
uv pip install -r pyproject.toml[test]
(nb run | tee output.log) &
PID=$!
trap "kill $PID" EXIT
while ! grep -q "Uvicorn running on" output.log; do sleep 1; done
kill $PID
trap - EXIT
- name: Check Load Plugin Failure
run: |
cat output.log
if grep -q 'Failed to import' output.log; then
echo "Import failure detected"
exit 1
fi