Continuous integration: every check, blocking

Read Beacon Yard's nine CI jobs, set up branch protection with every check required and see what the workflow does not test.

Tool lesson, about 70 minutes, 10 steps

By the end you can

  • Read a GitHub Actions YAML workflow (on, jobs, runs-on, needs, steps, uses, run) and name Beacon Yard's nine m14-ship jobs
  • Say the difference between a red job, a failed workflow and a blocked merge, and turn on GitHub branch protection with required status checks
  • Turn each local check red on purpose, read its message, and fix it

Before this: The toolchain: Rokit, Wally, pesde, StyLua, Selene, luau-lsp, GitHub: fork, clone, push, pull requests, CI checks

Step 1 of 10

Ten lines of GitHub Actions YAML

Before reading Beacon Yard's full workflow, learn the seven words every GitHub Actions file uses1. A workflow is a .yml file in .github/workflows/2:

yaml
name: check                    # Display name shown in the Actions tab
on: [push, pull_request]       # Events that start this workflow
jobs:                          # One or more jobs; they run in parallel by default
  lint:                        # Job id
    runs-on: ubuntu-latest     # Fresh virtual machine image (Linux)
    steps:                     # Ordered list of steps inside the job
      - uses: actions/checkout@v4  # Reusable action: downloads your repository
      - run: selene src tests      # Shell command; exit code 0 passes, non-zero fails
  build:
    needs: lint                # Optional: wait until the 'lint' job passes first
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: rojo build -o build/game.rbxlx

Indentation matters in YAML (two spaces per level). Without needs, jobs start at the same time on separate fresh machines.

Choose one

In the ten-line workflow above, what does `needs: lint` under `build` do?

In the ten-line workflow above, what does `needs: lint` under `build` do?

Press 1 to 4 to choose, Enter to check.

Link to this step ยท This confused me

Step 2 of 10

Beacon Yard's nine jobs at m14-ship

Every time someone pushes or opens a pull request, GitHub runs .github/workflows/ci.yml on fresh Linux machines. The Continuous integration (CI)Continuous integration (CI)Programs a server runs on every push to check the project still passes its tests.Think of it as an inspector who runs the same checklist on every delivery. idea is that a machine nobody has touched is the judge. Here is the entire file at m14-ship, which is also what main runs:

Beacon Yard's nine parallel CI jobsA Push or PR triggers three parallel lanes of GitHub Actions checks (code quality: commits, format, lint, types; repo guards: ids, challenges, actions-pinned; place builds: build, milestones), all feeding into required status checks before a merge to main.Push / PRci.ymlCode qualitycommits, format, lint, typesRepo guardsids, challenges, pinnedPlace buildsbuild (2), milestones (15)Merge gatebranch rules
All nine jobs run in parallel with no needs dependencies; branch protection blocks merges until every required check passes.
name: ci
 
on:
  push:
  pull_request:
 
jobs:
  commits:
    name: commit subjects
    runs-on: ubuntu-latest
    if: github.event_name == 'pull_request'
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
        with:
          fetch-depth: 0
      - name: Validate pull request commit subjects
        run: node scripts/check-commit-range.mjs ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
 
  format:
    name: format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
        with:
          version: v1.2.0
      - name: stylua --check .
        run: stylua --check .
 
  lint:
    name: lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
        with:
          version: v1.2.0
      - name: selene src tests
        run: selene src tests
      - name: selene unit
        run: selene unit
 
  types:
    name: type check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
        with:
          version: v1.2.0
      - name: wally install
        run: wally install
      - name: scripts/typecheck.sh
        run: bash scripts/typecheck.sh
 
  ids:
    name: id guard
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - name: node scripts/check-ids.mjs
        run: node scripts/check-ids.mjs
 
  challenges:
    name: challenge index
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - name: node scripts/check-challenges.mjs
        run: node scripts/check-challenges.mjs
 
  build:
    name: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
        with:
          version: v1.2.0
      - name: wally install
        run: wally install
      - name: rojo build
        run: |
          mkdir -p build
          rojo build default.project.json -o build/beacon-yard.rbxlx
      - name: rojo build the unit-test place
        run: rojo build test.project.json -o build/beacon-yard-tests.rbxlx
      - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
        with:
          name: beacon-yard-rbxlx
          path: build/beacon-yard.rbxlx
 
  milestones:
    name: every milestone tag
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
        with:
          fetch-depth: 0
          fetch-tags: true
      - uses: CompeyDev/setup-rokit@1d9390883f7ebce19d48f5b8d006e11d387c92ab # v0.2.1
        with:
          version: v1.2.0
      - name: scripts/check-milestones.sh
        run: bash scripts/check-milestones.sh
 
  actions-pinned:
    name: actions pinned
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
      - name: node scripts/check-actions-pinned.mjs
        run: node scripts/check-actions-pinned.mjs

None of the nine jobs sets needs, so they can run in parallel. Each checks out the repo. Jobs that need Roblox development tools install the versions pinned in rokit.toml with CompeyDev/setup-rokit3.

Notice what the workflow gained on top of m13-art-pass:

  • commit subjects: runs only on pull requests. It runs node scripts/check-commit-range.mjs over every commit in the pull request and fails if any subject is not a Conventional Commit, in the shape type(scope): lowercase description, for example ci: check that every commit follows conventional commits. A commit like Respawn coins after 3 seconds turns this job red, and so does one bad commit in the middle of a long branch. On a plain push with no pull request the job is skipped, and GitHub counts a skipped required check as passing.
  • types: installs Wally packages and runs bash scripts/typecheck.sh, which uses luau-lsp analyze against sourcemaps for src/, tests/ and unit/.
  • lint and build for tests: lint also runs selene unit, and build compiles both default.project.json and test.project.json (the Jest-Lua test place).

The workflow also runs challenges to check the challenge index and actions-pinned to check that Actions dependencies use commit hashes. Neither job launches Roblox.

Choose one

A pull request passes a string to a function that expects a number in a `--!strict` module. Which job in Beacon Yard's ci.yml catches that mistake?

A pull request passes a string to a function that expects a number in a `--!strict` module. Which job in Beacon Yard's ci.yml catches that mistake?

Press 1 to 4 to choose, Enter to check.

Link to this step ยท This confused me

Step 3 of 10

The commands are yours too

CI is an inspector at the workshop door. Whatever arrives gets the same checklist, whoever sent it.

Think of it as An inspector at the workshop door

Both sidesRemember: Continuous integration is an inspector at the workshop door.

The checklist is the same commands you run locally before pushing. Here are the core four on a clean checkout of m13-art-pass with the pinned tools (at m14-ship, you also run bash scripts/typecheck.sh):

Evidenceci-checks.log
$ stylua --check .
exit 0
 
$ selene src tests
Results:
0 errors
0 warnings
0 parse errors
exit 0
 
$ node scripts/check-ids.mjs
id guard: 222 files clean
exit 0
 
$ wally install
[INFO ] Updating package index https://github.com/UpliftGames/wally-index...
[INFO ] Downloaded 18 packages!
exit 0
CLAUDE.md
CONTRIBUTING.md
LICENSE
LICENSE-ART.md
MILESTONES.md
Packages
README.md
ServerPackages
assets
challenges
default.project.json
rokit.toml
scripts
selene.toml
src
stylua.toml
tests
wally.lock
wally.toml
 
$ mkdir -p build && rojo build default.project.json -o build/beacon-yard.rbxlx
Building project 'beacon-yard'
Built project to beacon-yard.rbxlx
exit 0
built file: 2199083 bytes
Match the pairs

Match each CI job to the command it runs.

Link to this step ยท This confused me

Step 4 of 10

Exit codes become red and green

CI knows nothing about your code. It only reads each command's exit codeExit codeThe number a program hands back when it ends; 0 means success.Think of it as a receipt that says whether the job worked.: 0 is green, anything else is red. Here is Selene on a file with an unused variable, and the other three checks failing on purpose too:

Evidenceci-failures.log
## 2. lint: an unused variable (the probe from challenges/solutions/ci.md)
$ selene src tests
warning[unused_variable]: forgotten is assigned a value, but never used
  โ”Œโ”€ src\server\SeleneProbe.luau:6:8
  โ”‚
6 โ”‚     local forgotten = 1
  โ”‚           ^^^^^^^^^
 
Results:
0 errors
1 warnings
0 parse errors
exit 1

The same log tries each check:

Evidenceci-failures.log
## 3. id guard: a nine-digit number outside the Ids files
$ node scripts/check-ids.mjs
src/shared/IdLeak.luau:2: 9-digit number 123456789 outside the Ids files
 
id guard: 1 problem(s). Move account ids into src/shared/Ids.luau (default 0) and your Ids.local.luau.
exit 1

A failing command fails its step, which fails its job, which fails the workflow. There is a way to hide that: a step marked continue-on-error is allowed to fail without failing the job2. Beacon Yard uses it nowhere, so every check is a real check.

Choose one

You push a file containing `local id = 123456789` in src/shared. Which job goes red?

You push a file containing `local id = 123456789` in src/shared. Which job goes red?

Press 1 to 4 to choose, Enter to check.

Link to this step ยท This confused me

Step 5 of 10

Red is not the same as blocked

A red job tells you something is wrong. It does not stop anyone. To make a check block, you turn on a branch protection rule (or a repository ruleset) for main and mark each job as a required status check4:

  1. On GitHub, open your repository and click Settings.
  2. In the left sidebar under Code and automation, click Branches, then Add branch protection rule (or open Rules > Rulesets > New branch ruleset).
  3. Enter main as the Branch name pattern.
  4. Tick Require status checks to pass before merging (and optionally Require branches to be up to date before merging).
  5. Search for and add the check names that have run on the repository. Add all nine: commit subjects, format, lint, type check, id guard, challenge index, build, every milestone tag and actions pinned. A name only appears in the search after the job has run once, so open one pull request first. A job you leave off the list can fail and the merge still goes through.
  6. Click Create or Save changes.

Until you do that, a red check is only a loud suggestion.

Where checks can run

OptionWhat it isWhen pros pick itTrade-offs
GitHub ActionsWorkflows in .github/workflows, run on GitHub's machines for pushes and pull requests.Repos hosted on GitHub. Roblox's place CI/CD demo uses it, with Rojo, Selene and StyLua.Tied to GitHub, and the versions of the actions you call need updating by hand.
GitLab CI/CDPipelines described in .gitlab-ci.yml, run by GitLab.Repos hosted on GitLab, including many company and university servers.A different file format, so a workflow does not copy across.
Git hooks on your machineScripts Git runs before a commit or a push.Catching a format slip in two seconds, before the push.Nobody has to install them and anyone can skip them, so they cannot be the only check.
No automationA person reads every change and runs the commands.A solo project in its first week.It works until the one day the person is tired.
Choose one

The lint job fails on a pull request. What stops the merge?

The lint job fails on a pull request. What stops the merge?

Press 1 to 4 to choose, Enter to check.

Link to this step ยท This confused me

Step 6 of 10

One job checks every milestone

Beacon Yard's milestones are a stack of git tags, and each tag has to build and pass the checks, or a learner who starts there hits a broken lesson. The milestones job runs scripts/check-milestones.sh. For each tag it makes a temporary worktree, installs packages where there is a wally.lock, and runs StyLua, Selene, the id guard and a Rojo build. Here is the real run on 2026-11-23:

Evidencecheck-milestones.log
PASS m00-baseplate
    stylua: ok
    selene: 0 errors 0 warnings 0 parse errors 
    id guard: 23 files clean
    rojo build: ok
PASS m01-first-parts
Evidencecheck-milestones.log
check-milestones: 15 tag(s) passed
exit 0
Work it out

How many milestone tags passed in that run?

tags

Link to this step ยท This confused me

Step 7 of 10

Where the inspector picture breaks

Both sidesRemember: Continuous integration is an inspector at the workshop door.

An inspector tests what is on the checklist. Think about what is not on Beacon Yard's before you open the breakdown.

Where does it break?โ€œAn inspector at the workshop doorโ€ is a good picture of continuous integration. Where does it stop being true?

It breaks here. The inspector only checks what is on the checklist, so a neatly formatted change that sets COIN_VALUE to 5000 still gets a green stamp.

The true model. CI runs commands on a fresh machine for every push and reports each command's exit code. A pass proves only what those commands test, so the project is only as safe as its tests.

Choose one

A pull request sets COIN_VALUE to 5000 in Config.luau. Format, lint, type check, id guard and build all pass. What does CI say?

A pull request sets COIN_VALUE to 5000 in Config.luau. Format, lint, type check, id guard and build all pass. What does CI say?

Press 1 to 4 to choose, Enter to check.

Link to this step ยท This confused me

Step 8 of 10

Build it: turn each check red, then green

First, make sure your build/ folder exists using the command for your operating system:

Your system

Windows

powershell
New-Item -ItemType Directory -Force build

macOS

bash
mkdir -p build

Linux

bash
mkdir -p build

Build along

m14-ship

  • .github/workflows/ci.yml
  1. In a clean checkout run wally install first, because the Rojo project maps the Packages and ServerPackages folders and the build needs them. Then run stylua --check ., selene src tests, node scripts/check-ids.mjs, and rojo build default.project.json -o build/beacon-yard.rbxlx.

    You should see All five commands exit 0 before you start.

  2. Create src/shared/Messy.luau containing local x = 1 and return x. Run stylua --check ., then stylua src/shared/Messy.luau, then delete the file.

    You should see stylua --check prints a diff showing the extra spaces and exits 1; after stylua on the file it exits 0.

  3. Create the Selene probe from challenges/solutions/ci.md in src/server/. Run selene src tests, then delete it.

    You should see selene prints warning[unused_variable] and exits 1; with the file deleted it exits 0.

  4. Write local id = 123456789 in a new file under src/shared. Run node scripts/check-ids.mjs, then delete the file.

    You should see The id guard prints the file, the line and the number, and exits 1.

  5. Change src/loading in default.project.json to a folder that does not exist. Run rojo build, then restore the file with git checkout -- default.project.json (or git restore default.project.json).

    You should see Rojo prints that the $path could not be turned into an Instance, and exits 1; restoring the file makes it exit 0.

Link to this step ยท This confused me

Step 9 of 10

Challenges

Level 1, Apprentice

Challenge

Read .github/workflows/ci.yml at m14-ship and write one line for each job.

Start from
The game at milestone m14 (download)

Done means

  • You named the nine jobs at m14-ship and said what each runs
  • You said which two jobs install Wally packages first

Meet the criteria above, then record your own result. No test grades this check.

Level 2, Builder

Challenge

Pins in a workflow lag like pins in rokit.toml. Measure how far.

Start from
The game at milestone m14 (download)

Done means

  • You found the version of actions/checkout and of actions/upload-artifact that ci.yml uses
  • You looked up the newest release of each on its GitHub page and wrote down the gap
  • You said who decides when to raise them

Meet the criteria above, then record your own result. No test grades this check.

Choose one

ci.yml pins actions/checkout to a commit hash that its comment labels v4, and the newest release is v7.0.1. What does that mean for Beacon Yard's CI?

ci.yml pins actions/checkout to a commit hash that its comment labels v4, and the newest release is v7.0.1. What does that mean for Beacon Yard's CI?

Press 1 to 4 to choose, Enter to check.

Level 3, Professional

Challenge

Make the four checks red and green again. The grader is the commands themselves: each prints its own pass or fail through its exit code, so there is no Luau test, and GitHub is the checker for the push. The steps are in challenges/solutions/ci.md.

Start from
The game at milestone m14 (download)

Done means

  • Each of format, lint, id guard and build was made to fail on purpose, one at a time, and the exit code was 1
  • Each was fixed, and all four commands exit 0 together at the end
  • git status is clean, and no probe file is left behind
  • You can say what each message told you to do
Choose one

You finished the four-reds challenge. What should git status show?

You finished the four-reds challenge. What should git status show?

Press 1 to 4 to choose, Enter to check.

Link to this step ยท This confused me

Step 10 of 10

Recap

Retiring the analogy

You no longer need โ€œan inspector at the workshop doorโ€. CI runs commands on a fresh machine for every push and reports each command's exit code. A pass proves only what those commands test, so the project is only as safe as its tests.

Recap

  1. A GitHub Actions YAML file declares on, jobs, runs-on, needs, steps, uses and run. At m14-ship, ci.yml runs nine jobs: commits (named commit subjects, pull requests only), format, lint, types, ids, challenges, build, milestones and actions-pinned.
  2. CI reads exit codes: 0 is green, anything else is red. A red job blocks merges only after you enable branch protection with Require status checks to pass before merging, and only the jobs you add to the required list block.
  3. CI only checks its checklist: it type-checks and builds test.project.json, but does not run Roblox itself, so playtests and Jest-Lua still run in Studio unless you add Open Cloud Luau Execution.

Continuous integration is an inspector at the workshop door, until the inspector only checks what is on the checklist, so a neatly formatted change that sets COIN_VALUE to 5000 still gets a green stamp.

Next Deploying with Open Cloud: staging and production

Link to this step ยท This confused me