CertGrid CertGrid
Configuration·Python Automation for IT

CI Pipeline for Python Automation

A test suite nobody runs is documentation. This guide builds the pipeline as a shell script first - lint, format, test, coverage - watches each gate fail and get fixed, then expresses the same four commands as a GitHub Actions workflow and as a pre-commit hook. Including the YAML surprise in every workflow file ever written, and what happens when somebody uses `--no-verify`.

Remote Hosts and CI/CD Guide 37 of 39 Intermediate

Written against the versions above. ruff 0.16.4, coverage 7.15.4, pytest 9.1.1, git 2.53. The workflow file targets `actions/checkout@v4` and `actions/setup-python@v5`. `coverage --fail-under` exits 2, which is worth knowing before you write `if [ $? -eq 1 ]`.

Everything on this page runs on the control node. Any machine with Python 3 will do.
Server NameIP AddressOSRolesCPURAMHDD
RUNNER01192.168.0.27Ubuntu 26.04 LTSControl node - every script in this path runs here2 Core4 GB50 GB

Before you start

  1. The project a pipeline runs against

  2. One script that is the pipeline

  3. Gate one, and a fix it can apply itself

  4. Gate two, which has no opinion to argue with

  5. Gate four, and the branch nobody tested

  6. The same gates as a workflow file

  7. Which is a YAML trap, not a GitHub one

  8. The commands are the same commands

  9. A pre-commit hook, so it fails before the push

  10. And what --no-verify costs

Official sources