GitHub Actions Fundamentals Course / Chapter 1 — CI/CD Thinking and Your First Workflow (lessons 1–4) / Lesson 1

CI/CD and Your First Workflow

Time needed: about 4 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

The 4 checks that used to be done by hand

Write tests, and they're pointless if you forget to run them.

The sample's app/ is a small API that just returns a greeting from a name and a language (built in Python, depending only on the standard library).

Let's first write out, as a script, the things we want to check before pushing.

check.sh

#!/usr/bin/env bash # The "checks before pushing" that a person used to do by hand. Doing all four every time without forgetting is hard set -euo pipefail uv run ruff check . # 1. Lint (style mistakes) uv run ruff format --check . # 2. Formatting uv run mypy src tests # 3. Type checking uv run pytest # 4. Tests echo "All 4 checks passed"

Terminal

$ cd app $ bash ../Session01_WhyAutomate/check.sh All checks passed! 6 files already formatted Success: no issues found in 5 source files .......... [100%] 10 passed in 2.10s All 4 checks passed

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.