From fd37053afe63cfa987adf3f8119f390283c500a6 Mon Sep 17 00:00:00 2001 From: stqfdyr <89149493+stqfdyr@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:12:26 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=B8=8E=E5=B7=B2=E5=8F=91=E5=B8=83=20hu?= =?UTF-8?q?b=20=E8=B7=91=E7=AB=AF=E5=88=B0=E7=AB=AF=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=EF=BC=8Ctag=20=E9=A1=BB=E4=B8=8E=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 14 ++++++++++++++ .github/workflows/release.yml | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06fc4ee..29bbd90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,3 +27,17 @@ jobs: - run: cargo fmt --all --check - run: cargo clippy --all-targets -- -D warnings - run: cargo test + + # This commit's agent against the latest released hub, through the hub + # repository's end-to-end script: the reported fields are checked where + # the hub and the themes read them, not only where they are serialized. + - uses: actions/checkout@v7 + with: + repository: monitor-probe/monitor + path: hub + sparse-checkout: scripts + - run: cargo build + - run: | + curl -fsSL -o monitor-hub https://github.com/monitor-probe/monitor/releases/latest/download/monitor-hub-x86_64-unknown-linux-musl + chmod +x monitor-hub + - run: hub/scripts/e2e.sh ./monitor-hub target/debug/monitor-agent diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f47d0ac..4225e06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,12 @@ jobs: target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl] steps: - uses: actions/checkout@v7 + # A v* tag can be neither moved nor deleted, so one that disagrees with the + # version the agent reports stops here, before anything is published. + - if: startsWith(github.ref, 'refs/tags/') + run: | + V=v$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml) + [ "$GITHUB_REF_NAME" = "$V" ] || { echo "::error::tag $GITHUB_REF_NAME, Cargo.toml $V"; exit 1; } - uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }}