diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a1a186..d9b9033 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: needs: build-frontend strategy: matrix: - python-version: ["3.10"] + python-version: ["3.9","3.10"] os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false env: @@ -97,6 +97,17 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Test Build + uses: docker/build-push-action@v2 + if: github.event_name == 'pull_request' + with: + context: . + file: ./docker/Dockerfile_with_frontend + push: false + tags: felinae98/nonebot-bison:dummy + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Login to DockerHub if: github.event_name != 'pull_request' uses: docker/login-action@v1 @@ -106,10 +117,11 @@ jobs: - name: Build and push uses: docker/build-push-action@v2 + if: github.event_name != 'pull_request' with: context: . file: ./docker/Dockerfile_with_frontend - push: ${{ github.event_name != 'pull_request' }} + push: true tags: felinae98/nonebot-bison:${{ env.GITHUB_REF_NAME }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/pyproject.toml b/pyproject.toml index a133c13..3c43b49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.10,<4.0.0" +python = ">=3.9,<4.0.0" nonebot2 = "^2.0.0-beta.2" httpx = ">=0.16.1" bs4 = "^0.0.1" @@ -67,7 +67,7 @@ asyncio_mode = "auto" [tool.black] line-length = 88 -target-version = ["py310"] +target-version = ["py39","py310"] include = '\.pyi?$' extend-exclude = ''' '''