Skip to content

Commit f664a63

Browse files
authored
CI - Make new CI checks run in merge queue (#3016)
# Description of Changes A few of our new CI checks weren't set up to run in the merge queue, which prevented PRs from merging when those checks were marked required. # API and ABI breaking changes None. CI only change. # Expected complexity level and risk 1 # Testing This will have to be tested by making these checks required again, and then seeing if this PR can merge. --------- Co-authored-by: Zeke Foppa <[email protected]>
1 parent 0d0f824 commit f664a63

File tree

4 files changed

+40
-48
lines changed

4 files changed

+40
-48
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,41 @@ jobs:
236236
# happens very frequently on the `macos-runner`, but we haven't seen it on any others).
237237
cargo run --features github-token-auth --target ${{ matrix.target }} -p spacetimedb-update -- self-install --root-dir="${ROOT_DIR}" --yes
238238
"${ROOT_DIR}"/spacetime --root-dir="${ROOT_DIR}" help
239+
240+
cli_docs:
241+
name: Check CLI docs
242+
permissions: read-all
243+
runs-on: ubuntu-latest
244+
steps:
245+
- name: Find Git ref
246+
env:
247+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
248+
shell: bash
249+
run: |
250+
PR_NUMBER="${{ github.event.inputs.pr_number || null }}"
251+
if test -n "${PR_NUMBER}"; then
252+
GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )"
253+
else
254+
GIT_REF="${{ github.ref }}"
255+
fi
256+
echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV"
257+
- name: Checkout sources
258+
uses: actions/checkout@v4
259+
with:
260+
ref: ${{ env.GIT_REF }}
261+
- uses: dsherret/rust-toolchain-file@v1
262+
- name: Check for docs change
263+
run: |
264+
cargo run --features markdown-docs -p spacetimedb-cli > docs/docs/cli-reference.md
265+
cd docs
266+
# This is needed because our website doesn't render markdown quite properly.
267+
# See the README in docs for more details.
268+
sed -i'' -E 's!^(##) `(.*)`$!\1 \2!' docs/cli-reference.md
269+
sed -i'' -E 's!^(######) \*\*(.*)\*\*$!\1 <b>\2</b>!' docs/cli-reference.md
270+
git status
271+
if git diff --exit-code HEAD; then
272+
echo "No docs changes detected"
273+
else
274+
echo "It looks like the CLI docs have changed:"
275+
exit 1
276+
fi

.github/workflows/pr-only-ci.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/typescript-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- master
8+
merge_group:
89

910
jobs:
1011
build:

.github/workflows/typescript-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- master
77
pull_request:
8+
merge_group:
89

910
jobs:
1011
compile-and-test:

0 commit comments

Comments
 (0)