Skip to content
Episodes

Episodes

Work through the episodes in order: each one builds on the CI/CD workflow from the previous episode. Where GitHub and Gitea differ, the episodes show both in tabs.

Episode 1

Introduction

Teaching 5 min
Estimated 5 min

What is CI/CD? Continuous Integration (CI), and Continuous Deployment (CD) are two related concepts in the field of DevOps, a sub-domain of software engineering.

Open page

Episode 2

Exit Codes

Teaching 10 min
Exercises 10 min
Estimated 20 min

As we enter the first episode of the Continuous Integration / Continuous Deployment (CI/CD) session, we learn how to exit. Exit codes communicate the outcome of a script with (in this case) the CI/CD pipeline. We …

Open page

Episode 3

Being Assertive

Teaching 5 min
Exercises 5 min
Estimated 10 min

This is a relatively short section, but we need to connect some things you’ve learned from testing in Python with exit codes. Assert Your Tests An assertion is a sanity-check carried out by the assert statement, useful …

Open page

Episode 4

Understanding YAML

Teaching 5 min
Estimated 5 min

YAML YAML (YAML Ain’t Markup Language (a recursive acronym), originally standing for Yet Another Markup Language) is a human-readable data-serialization language. It is commonly used for configuration files and in …

Open page

Episode 5

YAML and GitHub Actions

Teaching 5 min
Estimated 5 min

GitHub Actions YAML The GitHub Actions configurations are specified using YAML files stored in the.github/workflows/ directory. Here is an example of a YAML file:

Open page

Episode 6

Coffee break!

Exercises 15 min
Estimated 15 min
Open page

Episode 7

Hello CI World

Teaching 5 min
Exercises 10 min
Estimated 15 min

Adding CI/CD to a project The first thing we’ll do is create a .github/workflows/main.yml file in the project.

Open page

Episode 8

Adding CI to Your Existing Code

Teaching 5 min
Exercises 10 min
Estimated 15 min

Time To Skim The Naive Attempt As of right now, your .github/workflows/main.yml should look like

Open page

Episode 9

Matrix

Teaching 5 min
Exercises 10 min
Estimated 15 min

Matrix From the previous lesson, we tried to build the code against two different ROOT images by adding an extra job: GitHubGitea jobs: greeting: runs-on: ubuntu-latest steps: - run: echo hello world build_skim: runs-on: …

Open page

Episode 10

Coffee break!

Exercises 15 min
Estimated 15 min
Open page

Episode 11

Dependent Jobs

Teaching 5 min
Exercises 5 min
Estimated 10 min

Defining dependencies From the last session, we’re starting with GitHubGitea jobs: greeting: runs-on: ubuntu-latest steps: - run: echo hello world build_skim: runs-on: ubuntu-latest container: rootproject/root:${{ …

Open page

Episode 12

A Skimmer Higgs

Teaching 5 min
Exercises 10 min
Estimated 15 min

The First Naive Attempt Let’s just attempt to try and get the code working as it is. Since it worked for us already locally, surely the CI/CD must be able to run it?

Open page

Episode 13

Getting into the Spy Game

Teaching 5 min
Exercises 10 min
Estimated 15 min

Challenge Recall GitHubGitea build_skim: needs: greeting runs-on: ubuntu-latest container: rootproject/root:${{ matrix.version }} strategy: matrix: version: [6.26.10-conda, latest] steps: - name: checkout repository …

Open page

Episode 14

Making Plots to Take Over The World

Teaching 5 min
Exercises 10 min
Estimated 15 min

On Your Own So in order to make plots, we just need to take the skimmed file skim_ggH.root and pass it through the histograms.py code that exists. This can be run with the following code:

Open page

Episode 15

Let's Actually Make A Test (For Real)

Teaching 5 min
Exercises 20 min
Estimated 25 min

So at this point, I’m going to be very hands-off and just explain what you will be doing. Here’s where you should be starting from:

Open page

Episode 16

Homework

Exercises 30 min
Estimated 30 min

Like the last section, I will simply explain what you need to do. After the previous section, you should have the following in .github/workflows/main.yml: GitHubGitea jobs: build_skim: runs-on: ubuntu-latest container: …

Open page

Episode 17

Bonus Episode: Building and deploying a Docker container to Github Packages

Teaching 40 min
Estimated 40 min

PrerequisitesFor this lesson, you should already be familiar with Docker images. Head over to our training on Docker if you aren’t already! Docker Container for Python Packages Python packages can be installed using a …

Open page