From 19e39f10d713e5a7d148253148dadbd424c9baac Mon Sep 17 00:00:00 2001 From: Bartosz Date: Mon, 7 Sep 2026 17:05:57 +0200 Subject: [PATCH 1/2] Test the example against the SDK main branch. --- .github/workflows/test-develop.yml | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/test-develop.yml diff --git a/.github/workflows/test-develop.yml b/.github/workflows/test-develop.yml new file mode 100644 index 0000000..c667332 --- /dev/null +++ b/.github/workflows/test-develop.yml @@ -0,0 +1,43 @@ +name: Test against SDK main + +# Exercises the example app against the unreleased Castle Node SDK (main +# branch). @castleio/sdk builds to a gitignored dist/ and has no prepare script, +# so it cannot be installed from a Git ref directly; instead we clone, build and +# pack the main branch into a tarball and install that. +# +# This is the permanent test/sdk-develop branch: every push to it runs the suite +# against the latest main. Nightly/manual runs require this file to also live +# on the default branch (GitHub only honours schedule/workflow_dispatch from the +# default branch). +on: + push: + branches: [test/sdk-develop] + workflow_dispatch: + schedule: + - cron: "0 6 * * *" + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - name: Use Node.js + uses: actions/setup-node@v5 + with: + node-version: latest + + - name: Build @castleio/sdk from the main branch + run: | + git clone --depth 1 --branch main https://github.com/castle/castle-node.git "$RUNNER_TEMP/castle-node" + cd "$RUNNER_TEMP/castle-node" + npm install + npm run build + npm pack + echo "SDK_TARBALL=$(ls "$RUNNER_TEMP"/castle-node/castleio-sdk-*.tgz)" >> "$GITHUB_ENV" + + - name: Install the example against the main build + run: npm install "$SDK_TARBALL" + + - run: npm test From 3e43ff2f0d9957b1ccdaf183ff8763da8d57f1c3 Mon Sep 17 00:00:00 2001 From: Bartosz Date: Mon, 7 Sep 2026 17:16:45 +0200 Subject: [PATCH 2/2] Rename the SDK-main workflow to test-main. --- .github/workflows/{test-develop.yml => test-main.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{test-develop.yml => test-main.yml} (91%) diff --git a/.github/workflows/test-develop.yml b/.github/workflows/test-main.yml similarity index 91% rename from .github/workflows/test-develop.yml rename to .github/workflows/test-main.yml index c667332..9d450f0 100644 --- a/.github/workflows/test-develop.yml +++ b/.github/workflows/test-main.yml @@ -5,13 +5,13 @@ name: Test against SDK main # so it cannot be installed from a Git ref directly; instead we clone, build and # pack the main branch into a tarball and install that. # -# This is the permanent test/sdk-develop branch: every push to it runs the suite +# This is the permanent test/sdk-main branch: every push to it runs the suite # against the latest main. Nightly/manual runs require this file to also live # on the default branch (GitHub only honours schedule/workflow_dispatch from the # default branch). on: push: - branches: [test/sdk-develop] + branches: [test/sdk-main] workflow_dispatch: schedule: - cron: "0 6 * * *"