From 23ac2e01c39774141733c3c233b9c973e312555a Mon Sep 17 00:00:00 2001 From: Martin <60476606+mtmtian@users.noreply.github.com> Date: Fri, 2 Oct 2026 13:32:52 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E5=90=88=E5=B9=B6=20Python=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=89=A7=E8=A1=8C=E4=BB=A5=E5=87=8F=E5=B0=91=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E8=80=97=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc3d2ed..542bcdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,10 +43,7 @@ jobs: - name: Install test dependencies run: python3 -m pip install -r requirements-test.txt - - name: Run unit tests - run: python3 -m unittest discover -s tests -p 'test_*.py' -v - - - name: Validate with pinned Mihomo + - name: Prepare pinned Mihomo run: | curl --fail --location --retry 3 --max-time 120 \ https://github.com/MetaCubeX/mihomo/releases/download/v1.19.30/mihomo-linux-amd64-compatible-v1.19.30.gz \ @@ -62,10 +59,12 @@ jobs: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/2df2f6281aa2d14d54b8a099b9326f63ba389fd4/$source_name" \ --output "$RUNNER_TEMP/mihomo-data/$target_name" done - export MIHOMO_BIN="$RUNNER_TEMP/mihomo" - export MIHOMO_DATA_DIR="$RUNNER_TEMP/mihomo-data" - python3 -m unittest discover -s tests -p 'test_mihomo_config.py' -v - python3 -m unittest discover -s tests -p 'test_aggregate*.py' -v + + - name: Run Python tests + env: + MIHOMO_BIN: ${{ runner.temp }}/mihomo + MIHOMO_DATA_DIR: ${{ runner.temp }}/mihomo-data + run: python3 -m unittest discover -s tests -p 'test_*.py' -v subscription: name: Validate private subscription Worker