Files
ai-workflow-course/modules/14-continuous-integration/lab/ci-starter.yml
T
claude f98eacb196 fix(testing/ci/tooling): consistent unittest, venv guidance, runnable lab commands
- #9: standardize the test chain on stdlib unittest (nothing-to-install, which
  keeps M13's claims true and its planted bug intact). Aligned M5/M14/M16 prose,
  M14 lab/test_tasks.py, and ci/gitlab starters; ruff stays the only pip install.
- #20: add venv / PEP 668 / which-python guidance to M20 (+ M14/M15 local
  installs); point MCP config at the venv's absolute python.
- #21: replace M21 Part D's empty `git diff HEAD~1` with `git log -p` (no
  .gitignore added — device preserved).
- #22: add a dependency-install step before M23's green baseline on a fresh clone.
- #23: M24 reviewer/triage now tolerate code-fence-wrapped JSON (stdlib only);
  feature.patch trap untouched.
- #28: fix M27 Part D CI snippet path (working-directory) and require the gate to
  target a varying candidate; swapped_model regression kept as the fixture.

Closes #9
Closes #20
Closes #21
Closes #22
Closes #23
Closes #28

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
2026-06-22 16:07:47 -04:00

49 lines
2.0 KiB
YAML

# Starter CI workflow for the tasks-app — forge-native, GitHub Actions flavor.
#
# Where this file goes: GitHub Actions reads workflow files from the .github/workflows/ directory
# at the root of your repo. Copy this file to .github/workflows/ci.yml (the name "ci.yml" is yours
# to choose; the .github/workflows/ path is not). Commit it, push, and the forge runs it.
#
# The same three checks (lint, then test) exist on every forge — only the YAML shape differs. See
# gitlab-ci-starter.yml in this folder for the GitLab equivalent of this exact pipeline.
name: CI
# When should this run? "On every push, and on every pull request." That's the whole pitch of CI:
# nothing reaches the shared history without passing through here first.
on:
push:
pull_request:
jobs:
check:
# The runner: a fresh, throwaway Linux machine the forge spins up for this job. "Works on my
# machine" can't hide here — this machine has nothing of yours on it. (More on runners in
# Module 19, including running your own.)
runs-on: ubuntu-latest
steps:
# Step 1: get your code onto the runner. Without this the runner is empty.
- name: Check out the code
uses: actions/checkout@v4
# Step 2: install the language the project needs. Pin a version so CI matches what you run.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
# Step 3: install the linter (ruff), the new tool this module adds. The test runner is
# Python's standard-library unittest from Module 13 — nothing to install for it.
- name: Install tools
run: pip install ruff
# Step 4: lint. Style and obvious-mistake check. Fails the job on any finding (non-zero exit).
- name: Lint
run: ruff check .
# Step 5: test. The Module 13 tests, run with the stdlib unittest runner. A single failing
# assertion fails the whole job.
- name: Test
run: python -m unittest