Skip to content

Commit 1019fd0

Browse files
committed
fix ci
1 parent d3244d8 commit 1019fd0

4 files changed

Lines changed: 28 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Release Dify Plugin
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
# tags:
6+
# - 'v*'
77

88
jobs:
99
build-and-release:
@@ -12,16 +12,12 @@ jobs:
1212
REPO_NAME: ${{ github.event.repository.name }}
1313

1414
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@main
17-
15+
- uses: actions/checkout@main
1816
- uses: davidkhala/uv-buildpack@main
19-
with:
20-
test-entry-point: pytest
2117
- name: Download dify-plugin-daemon
2218
run: |
2319
LATEST_RELEASE=$(curl -s https://api.github.com/repos/langgenius/dify-plugin-daemon/releases/latest)
24-
DOWNLOAD_URL=$(echo $LATEST_RELEASE | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu")) | .browser_download_url' | head -1)
20+
DOWNLOAD_URL=$(echo $LATEST_RELEASE | jq -r '.assets[] | select(.name | contains("dify-plugin-linux-amd64")) | .browser_download_url' | head -1)
2521
curl -L -o ../dify $DOWNLOAD_URL
2622
chmod +x ../dify
2723
../dify --version

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: ci
2+
on: push
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@main
9+
- uses: davidkhala/uv-buildpack@main
10+
with:
11+
test-entry-point: pytest

pyproject.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[project]
2-
name = ""
2+
name = "html-extractor"
33
version = "0"
44
dependencies = [
5-
"dify-plugin==0.5.0b15",
5+
"dify-plugin==0.7.0b1",
66
"pandas[excel,output-formatting,performance]>=2.2.5",
77
"chardet~=5.1.0",
88
"python-docx~=1.1.0",
@@ -18,5 +18,11 @@ dev = [
1818
"pytest"
1919
]
2020

21-
[tool.uv]
22-
package = false
21+
[tool.hatch.build.targets.wheel]
22+
packages = ["tools"]
23+
24+
[build-system]
25+
requires = ["hatchling"]
26+
build-backend = "hatchling.build"
27+
28+

tests/html_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import unittest
2-
from pathlib import Path
32

4-
from tools.document import Document, ExtractorResult
5-
from tools.html_extractor import HtmlExtractor # 修改为实际路径
3+
from tools.document import ExtractorResult
4+
from tools.html_extractor import HtmlExtractor
65

76

87
class MaskTestCase(unittest.TestCase):
@@ -85,7 +84,7 @@ def test_thei_page(self):
8584
no_header = HtmlExtractor(html_content, "-", "").extract().md_content
8685
self.assertNotIn("THEi 设计与建筑系", no_header)
8786
def test_real_page(self):
88-
with open("tests/fixtures/Bachelor of Engineering (Honours) in Building Services Engineering - Technological and Higher Education Institute of Hong Kong.html", 'r', encoding='utf-8') as f:
87+
with open("fixtures/Bachelor of Engineering (Honours) in Building Services Engineering - Technological and Higher Education Institute of Hong Kong.html", 'r', encoding='utf-8') as f:
8988
html_content = f.read()
9089
clean = HtmlExtractor(html_content, "mobile-menu-wrapper, breadcrumbs-wrapper, popup-login-wrapper, toolbar", "footer,header-info-swapper,thim-widget-button,elementor-widget-social-icons").extract().md_content
9190
self.assertNotIn("About", clean)

0 commit comments

Comments
 (0)