diff --git a/.github/workflows/registry.yml b/.github/workflows/registry.yml index 138e6c57e5..20d7d48cc8 100644 --- a/.github/workflows/registry.yml +++ b/.github/workflows/registry.yml @@ -51,16 +51,27 @@ jobs: fetch-depth: 0 - uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2 with: - install_args: jd yj + install_args: yj - id: diff shell: bash # -eo pipefail run: | + # If the workflow file itself is modified, run all tests + if git diff --name-only ${{ github.event.pull_request.base.sha }} HEAD | grep -q ".github/workflows/registry.yml"; then + echo "Workflow file modified. Running all tests." + echo "tools=" >> "$GITHUB_OUTPUT" + exit 0 + fi + changed_tools=$( \ - mise x jd -- jd -f merge \ + cat \ <(git show ${{ github.event.pull_request.base.sha }}:registry.toml | mise x yj -- yj -t) \ <(mise x yj -- yj -t < registry.toml) \ - | jq -r '[.tools // {} | keys[]] | join(" ")' \ - || true \ + | jq -rs ' + (.[0].tools) as $old | + (.[1].tools) as $new | + [ ($new | keys[]) | select($new[.] != $old[.]) ] | + join(" ") + ' || true \ ) echo "$changed_tools" echo "tools=$changed_tools" >> "$GITHUB_OUTPUT" @@ -72,6 +83,10 @@ jobs: needs: - build - list-changed-tools + if: | + !cancelled() && + needs.build.result == 'success' && + (needs.list-changed-tools.result == 'success' || needs.list-changed-tools.result == 'skipped') strategy: fail-fast: false matrix: diff --git a/registry.toml b/registry.toml index d463a506b8..86dda26341 100644 --- a/registry.toml +++ b/registry.toml @@ -2382,7 +2382,7 @@ description = "Io is a programming language focused on expressiveness through si [tools.istioctl] backends = ["aqua:istio/istio/istioctl", "asdf:virtualstaticvoid/asdf-istioctl"] description = "Istio configuration command line utility for service operators to debug and diagnose their Istio mesh" -test = ["istioctl version", "{{version}}"] +test = ["istioctl version --remote=false", "client version: {{version}}"] [tools.janet] backends = ["asdf:mise-plugins/mise-janet"] @@ -4691,8 +4691,10 @@ backends = [ ] description = "Tinymist is an integrated language service for Typst." test = [ - "tinymist --version | grep 'Build Git Describe:' | cut -d':' -f2 | tr -d ' '", - "v{{version}}", + "tinymist --version", + "", + # 0.14.4 doesn't print version + # "Build Git Describe: v{{version}}", ] [tools.tinytex] @@ -5092,7 +5094,7 @@ description = "Modern HTTP benchmarking tool" [tools.wtfutil] backends = ["aqua:wtfutil/wtf", "asdf:NeoHsu/asdf-wtfutil"] description = "WTF is the personal information dashboard for your terminal" -test = ["wtfutil --help", "wtfutil "] # may not have version in output +test = ["wtfutil --version", "WTF v{{version}}"] [tools.xc] backends = ["aqua:joerdav/xc", "asdf:airtonix/asdf-xc"]