Lesson 6 of 8
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.
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
1Ten 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:
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.
In the ten-line workflow above, what does `needs: lint` under `build` do?
Answer
Makes the build job wait until the lint job finishes and passes. needs creates an explicit dependency between jobs. If lint fails, GitHub skips build instead of wasting runner minutes.
Open this step in lesson mode · Link to this step · This confused me
2Beacon 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:
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 runsnode scripts/check-commit-range.mjsover every commit in the pull request and fails if any subject is not a Conventional Commit, in the shapetype(scope): lowercase description, for exampleci: check that every commit follows conventional commits. A commit likeRespawn coins after 3 secondsturns 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 runsbash scripts/typecheck.sh, which usesluau-lsp analyzeagainst sourcemaps forsrc/,tests/andunit/.lintandbuildfor tests:lintalso runsselene unit, andbuildcompiles bothdefault.project.jsonandtest.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.
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?
Answer
types (type check), because it runs scripts/typecheck.sh with luau-lsp analyze. StyLua formats whitespace, Selene lints code patterns, check-ids guards against real account numbers, and Rojo builds the tree. Only the types job runs luau-lsp analyze.
Open this step in lesson mode · Link to this step · This confused me
3The 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):
Evidence, figure 3.1ci-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 each CI job to the command it runs.
Answer
format: stylua --check .; lint: selene src tests; id guard: node scripts/check-ids.mjs; build: rojo build default.project.json -o build/beacon-yard.rbxlx. Each job runs the same command you can run locally. The build job also runs wally install first, and at m14-ship builds test.project.json too.
Open this step in lesson mode · Link to this step · This confused me
4Exit 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:
Evidence, figure 4.1ci-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:
Evidence, figure 4.2ci-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.
You push a file containing `local id = 123456789` in src/shared. Which job goes red?
Answer
The id guard, because it finds a nine-digit number outside the Ids files. scripts/check-ids.mjs fails on any nine-digit number or asset URL outside Ids.luau, so a real account id cannot slip into a commit.
Open this step in lesson mode · Link to this step · This confused me
5Red 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:
- On GitHub, open your repository and click Settings.
- In the left sidebar under Code and automation, click Branches, then Add branch protection rule (or open Rules > Rulesets > New branch ruleset).
- Enter
mainas the Branch name pattern. - Tick Require status checks to pass before merging (and optionally Require branches to be up to date before merging).
- 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 tagandactions 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. - Click Create or Save changes.
Until you do that, a red check is only a loud suggestion.
Where checks can run
| Option | What it is | When pros pick it | Trade-offs |
|---|---|---|---|
| GitHub Actions | Workflows 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/CD | Pipelines 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 machine | Scripts 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 automation | A 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. |
The lint job fails on a pull request. What stops the merge?
Answer
Branch protection (or a ruleset) with Require status checks to pass before merging enabled for lint. A failed job only reports. The repository owner turns on Require status checks to pass before merging and picks which jobs block the merge.
Open this step in lesson mode · Link to this step · This confused me
6One 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:
Evidence, figure 6.1check-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
Evidence, figure 6.2check-milestones.log
check-milestones: 15 tag(s) passed
exit 0
How many milestone tags passed in that run?
Answer
15 tags. The script reported 15 tags passed: m00 to m14, one per milestone. Every new tag joins the same run.
Open this step in lesson mode · Link to this step · This confused me
7Where 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.
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?
Answer
All green: none of the jobs plays the game or checks whether that coin value is balanced. CI formats, lints, type-checks and builds both place files, including test.project.json, but it does not run Roblox itself. Playtests (RunGameTests) and Jest-Lua specs still run inside Studio (or through Open Cloud Luau Execution, which this repo does not wire up in CI).
Open this step in lesson mode · Link to this step · This confused me
8Build it: turn each check red, then green
First, make sure your build/ folder exists using the command for your operating system:
Windows
New-Item -ItemType Directory -Force build
macOS
mkdir -p build
Linux
mkdir -p build
Build along
.github/workflows/ci.yml
In a clean checkout run
wally installfirst, because the Rojo project maps thePackagesandServerPackagesfolders and the build needs them. Then runstylua --check .,selene src tests,node scripts/check-ids.mjs, androjo build default.project.json -o build/beacon-yard.rbxlx.You should see All five commands exit 0 before you start.
Create
src/shared/Messy.luaucontaininglocal x = 1andreturn x. Runstylua --check ., thenstylua 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.
Create the Selene probe from
challenges/solutions/ci.mdinsrc/server/. Runselene src tests, then delete it.You should see selene prints warning[unused_variable] and exits 1; with the file deleted it exits 0.
Write
local id = 123456789in a new file undersrc/shared. Runnode 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.
Change
src/loadingindefault.project.jsonto a folder that does not exist. Runrojo build, then restore the file withgit checkout -- default.project.json(orgit 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.
Open this step in lesson mode · Link to this step · This confused me
9Challenges
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
Hints
- Look for wally install in ci.yml.
- Compare the step names with the commands in the log.
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
Hints
- ci.yml pins each action to a commit hash and marks the release in a trailing comment, `# v4` for both.
- On 2026-11-23 the newest tags were v7.0.1 for checkout and v7.0.2 for upload-artifact.
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?
Answer
It still runs the v4 line of the action; moving to v7 is a deliberate change to test, like raising a tool pin. A workflow calls an action by tag or commit hash, so it keeps using that exact version until someone changes the line. Raise it on a branch and let CI check itself.
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
Hints
- Do them one at a time, and restore with git checkout -- default.project.json or by deleting the probe.
- The log in this lesson shows all four messages.
- The written steps are in challenges/solutions/ci.md.
You finished the four-reds challenge. What should git status show?
Answer
Nothing to commit, with no probe files and the project file restored. A probe is deleted and the project file restored. build/ is git-ignored, so it would not show anyway.
Open this step in lesson mode · Link to this step · This confused me
10Recap
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
- 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.
- 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.
- 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.
Queued for review
Open this step in lesson mode · Link to this step · This confused me