Git & GitHub Course
Git & GitHub
/
Intermediate

GitHub Runners

Definition

A runner is a server that runs your workflows when they're triggered. Each runner can run a single job at a time.

Explain Like I'm New

The actual physical computer in a Microsoft datacenter that wakes up to do your work. You can request a Ubuntu Linux server, a Windows server, or even an Apple macOS server (which is required if you are building an iOS app!).

Real World Example

Running a massive test suite that takes 30 minutes on your laptop. On GitHub, you request 20 Runners to run 20 pieces of the test suite simultaneously, finishing the entire test in 90 seconds.

Common Use Cases

  • •Cross-platform testing
  • •Speeding up builds

Terminal Output

bash / terminal
# Running the exact same tests across THREE different Operating Systems simultaneously! jobs: test-multi-os: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - run: echo "Running on ${{ matrix.os }}"

Interview Questions

basic

  • What operating system do most developers choose for their Runners because it boots up the fastest?

intermediate

  • What is a 'Self-Hosted' Runner?

Flash Cards

Question

Fastest OS?

Click to reveal answer
Answer

`ubuntu-latest` (Linux). It is extremely lightweight and fast.

Question

Self-Hosted?

Click to reveal answer
Answer

If your company has strict security rules, or needs massive supercomputers to train AI, you can install the GitHub Action software on your OWN private servers. GitHub will ping your server to run the jobs instead of using Microsoft's servers.