-
Notifications
You must be signed in to change notification settings - Fork 3
feat: OpenClaw version tests #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
73b233a
feat: OpenClaw version tests
protoss70 182eaec
fix: test fixes
protoss70 9bdf56f
fix: run tests in parallel
protoss70 85cfff1
fix: only test 3 latest versions
protoss70 84c1e53
fix: test fixes
protoss70 11ac4d2
fix: re-introduce discovery
protoss70 ae53f68
fix: version install fix
protoss70 1ea0820
fix: on PR test branch on schedule test latest release
protoss70 48b047f
fix: make test required
protoss70 6156bb3
fix: build fix
protoss70 2d0261d
fix: bump openclaw version
protoss70 ede394a
fix: tool fix
protoss70 b800018
fix: final Actor count fixes
protoss70 4431712
Merge branch 'main' into feat/plugin-install-tests
protoss70 981b997
Merge branch 'feat/plugin-install-tests' into fix/openclaw-version-fix
protoss70 31a811c
Merge pull request #27 from apify/fix/openclaw-version-fix
protoss70 e551553
fix: install and pack
protoss70 cd0ffb8
fix: package lock update and drop FLOOR
protoss70 fd49a06
fix: script to bump openclaw version
protoss70 167ff74
fix: concurrency fix
protoss70 7422178
Merge remote-tracking branch 'origin/main' into feat/plugin-install-t…
protoss70 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| name: OpenClaw Version Test | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| # Mondays 07:00 UTC — 8am Prague in winter (CET), 9am Prague in summer (CEST). | ||
| - cron: "0 7 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: openclaw-version-test-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| jobs: | ||
| discover: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| versions: ${{ steps.filter.outputs.versions }} | ||
| steps: | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - id: filter | ||
| name: Pick latest 3 OpenClaw versions | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| # Drop pre-releases (anything with '-'), sort by semver, take the latest 3. | ||
| versions=$( | ||
| npm view openclaw versions --json \ | ||
| | jq -r '.[] | select(test("-") | not)' \ | ||
| | sort -V \ | ||
| | tail -n 3 | ||
| ) | ||
|
|
||
| if [ -z "$versions" ]; then | ||
| echo "No stable OpenClaw versions found on npm." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| json=$(echo "$versions" | jq -R . | jq -sc .) | ||
| echo "versions=$json" >> "$GITHUB_OUTPUT" | ||
| echo "Selected versions: $json" | ||
|
|
||
| test: | ||
| needs: discover | ||
| runs-on: ubuntu-latest | ||
| name: OpenClaw ${{ matrix.version }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| version: ${{ fromJson(needs.discover.outputs.versions) }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install OpenClaw ${{ matrix.version }} and smoke-test plugin | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| # On PRs, pack the PR's source and install that tarball. On schedule / | ||
| # manual dispatch, install the currently-published @latest from npm. | ||
| if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then | ||
| echo "::group::npm install && npm pack (PR branch)" | ||
| cd "$GITHUB_WORKSPACE" | ||
| npm install | ||
| tarball=$(npm pack | tail -n 1) | ||
| PLUGIN_SPEC="$GITHUB_WORKSPACE/$tarball" | ||
| echo "Packed: $PLUGIN_SPEC" | ||
| echo "::endgroup::" | ||
| else | ||
| PLUGIN_SPEC="@apify/apify-openclaw-plugin@latest" | ||
| echo "Using published spec: $PLUGIN_SPEC" | ||
| fi | ||
|
|
||
| WORKDIR="$RUNNER_TEMP/openclaw-test" | ||
| mkdir -p "$WORKDIR" | ||
| cd "$WORKDIR" | ||
|
|
||
| echo "::group::npm install openclaw@${{ matrix.version }}" | ||
| npm init -y >/dev/null | ||
| npm install "openclaw@${{ matrix.version }}" | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::openclaw plugins install $PLUGIN_SPEC" | ||
| npx --no-install openclaw plugins install "$PLUGIN_SPEC" | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::openclaw plugins list" | ||
| list_output=$(npx --no-install openclaw plugins list) | ||
| echo "$list_output" | ||
| if ! echo "$list_output" | grep -q "apify-openclaw-plugin"; then | ||
| echo "FAIL: apify-openclaw-plugin not present in 'plugins list' output" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::openclaw plugins inspect apify-openclaw-plugin --runtime --json" | ||
| inspect_json=$(npx --no-install openclaw plugins inspect apify-openclaw-plugin --runtime --json) | ||
| echo "$inspect_json" | jq . | ||
| if ! echo "$inspect_json" | jq -e '.. | strings | select(. == "apify")' >/dev/null; then | ||
| echo "FAIL: 'apify' tool not found in plugin runtime inspect output" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "::endgroup::" | ||
|
|
||
| echo "OK: plugin loaded and apify tool is registered on openclaw ${{ matrix.version }}" | ||
|
|
||
| # Stable aggregator check — mark THIS one as required in branch protection. | ||
| # The matrix job names ("OpenClaw 2026.5.X") rotate as discovery picks up new | ||
| # versions, but this job's name never changes. | ||
| required: | ||
| needs: [discover, test] | ||
| if: always() | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: All OpenClaw version tests must pass | ||
| shell: bash | ||
| run: | | ||
| if [[ "${{ needs.discover.result }}" != "success" || "${{ needs.test.result }}" != "success" ]]; then | ||
| echo "discover=${{ needs.discover.result }} test=${{ needs.test.result }}" | ||
| echo "One or more OpenClaw version tests failed." | ||
| exit 1 | ||
| fi | ||
| echo "All OpenClaw version tests passed." | ||
|
|
||
| # Slack notification on scheduled failure — disabled for now. | ||
| # To re-enable: uncomment this job and set the `SLACK_WEBHOOK_URL` repo secret. | ||
| # | ||
| # notify: | ||
| # needs: test | ||
| # if: always() && needs.test.result == 'failure' && github.event_name == 'schedule' | ||
| # runs-on: ubuntu-latest | ||
| # steps: | ||
| # - name: Notify Slack on scheduled failure | ||
| # env: | ||
| # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
| # RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| # shell: bash | ||
| # run: | | ||
| # if [ -z "${SLACK_WEBHOOK_URL:-}" ]; then | ||
| # echo "SLACK_WEBHOOK_URL secret not configured — skipping notification." | ||
| # exit 0 | ||
| # fi | ||
| # | ||
| # payload=$(jq -nc \ | ||
| # --arg text "🚨 *OpenClaw Version Test failed* (scheduled run) | ||
| # One or more OpenClaw versions failed the plugin install smoke test. | ||
| # <${RUN_URL}|View run details>" \ | ||
| # '{text: $text}') | ||
| # | ||
| # curl -sS -X POST -H 'Content-Type: application/json' \ | ||
| # --data "$payload" "$SLACK_WEBHOOK_URL" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.