Reusable CI workflows for Py/TS with SBOM & signatures.
Project description
⭐ ci-matrix-starter — Reusable CI Workflows (Python & TypeScript)
A lean, production-ready GitHub Actions starter that ships reusable CI workflows for Python (3.11/3.12) and TypeScript/Node 20. It’s designed for always-green CI with strict local gates mirroring CI, CodeQL out of the box, optional SBOM generation, and guard-rails for safe merges (branch protection + required checks).
Repo layout
.
├── .github/workflows/
│ ├── build.yml # Aggregator: calls reusable jobs (TS & Py)
│ ├── ts-ci.yml # Reusable TypeScript/Node CI
│ └── py-ci.yml # Reusable Python CI
├── src/
│ ├── index.ts # minimal TS sanity (example)
│ └── ci_matrix_starter/ # minimal Py package (example)
├── tests/ # Python tests (example)
├── package.json # Node project (example scripts)
├── pyproject.toml # Python tooling (ruff/black/pytest/mypy)
└── README.md
🚀 Quick Start (consumers)
Use the reusable workflows in your repo
Create .github/workflows/ci.yml in your project:
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
# Python matrix (3.11/3.12) with strict gates
py:
uses: CoderDeltaLAN/ci-matrix-starter/.github/workflows/py-ci.yml@v0.1.0
with:
py-versions: '["3.11","3.12"]'
cov-min: 100
# TypeScript / Node 20
ts:
uses: CoderDeltaLAN/ci-matrix-starter/.github/workflows/ts-ci.yml@v0.1.0
Tip: the aggregator in this repo (
build.yml) is a reference showing how to orchestrate multiple reusable jobs.
Local mirror (same gates as CI)
Node / TS
npx prettier --check .
npx eslint . --max-warnings=0
npx tsc --noEmit
npm test --silent
Python
python -m pip install --upgrade pip
pip install poetry
poetry install --no-interaction
poetry run ruff check .
poetry run black --check .
PYTHONPATH=src poetry run pytest -q --cov=src --cov-fail-under=100
poetry run mypy src
Nothing in your shell needs to change. Consume the workflows by reference (
uses:) and keep your repo clean.
📦 What the workflows expect
TypeScript
package.jsonwithtestscript (any test runner).tsconfig.jsonlimiting sources (e.g.,src/**/*.ts).eslint.config.mjs(flat config) and Prettier 3.- Node 20.x recommended.
Python
pyproject.tomlwith dev tools (ruff, black, pytest, mypy, poetry).- Tests under
tests/; coverage threshold viacov-mininput (default in example:100). - Matrix 3.11/3.12 (customizable via
py-versions).
Optional SBOM & signing
- Workflows can export SBOMs (CycloneDX). If you set
COSIGN_KEY&COSIGN_PASSWORDas secrets, signing will be attempted (safe-by-default: skipped when absent).
⛳ Required checks (CI gating)
Typical required contexts (suggested for branch protection):
CI / build(aggregator success)CodeQL Analyze / codeql(security)
Enable linear history, dismiss stale reviews on new pushes, and auto-merge once checks are green for a professional, low-friction flow.
🧪 Local Developer Workflow (mirrors CI)
# Node
npx prettier --check . && npx eslint . --max-warnings=0 && npx tsc --noEmit && npm test --silent
# Python
python -m pip install --upgrade pip && pip install poetry
poetry install --no-interaction
poetry run ruff check . && poetry run black --check .
PYTHONPATH=src poetry run pytest -q --cov=src --cov-fail-under=100
poetry run mypy src
🔧 CI (GitHub Actions)
- Reusable jobs for Python and TypeScript; call them from your repo via
uses:with a tag (e.g.,@v0.1.0). - Built-in CodeQL workflow example.
- Strict, fast feedback suitable for PR auto-merge when green.
Python job snippet recap:
- run: python -m pip install --upgrade pip
- run: pip install poetry
- run: poetry install --no-interaction
- run: poetry run ruff check .
- run: poetry run black --check .
- env:
PYTHONPATH: src
run: poetry run pytest -q
- run: poetry run mypy src
TypeScript job snippet recap:
- run: npx prettier --check .
- run: npx eslint . --max-warnings=0
- run: npx tsc --noEmit
- run: npm test --silent || echo "no tests"
🗺 When to Use This Project
- You need ready-to-use CI for Python + TypeScript with clean defaults.
- You want reusable workflows you can reference by tag.
- You value security (CodeQL), SBOMs, and strict gates to keep
mainalways green.
🧩 Customization
- Pin a release tag, e.g.,
@v0.1.0. - Adjust Python matrix:
with.py-versions. - Tune coverage:
with.cov-min. - Provide secrets to enable optional cosign signing.
- Extend jobs by adding your own steps after
uses:blocks.
🔒 Security
- Code scanning via CodeQL.
- Recommend enabling: required conversations resolved, dismiss stale reviews, signed commits, and squash merges.
- Avoid uploading sensitive artifacts to public PRs.
🙌 Contributing
- Small, atomic PRs using Conventional Commits.
- Keep local & CI gates green before requesting review.
- Use auto-merge once checks pass.
💚 Donations & Sponsorship
If this project saves you time, consider supporting ongoing maintenance. Thank you!
🔎 SEO Keywords
reusable github actions workflows, python typescript ci starter, node 20 eslint 9 prettier 3, ruff black mypy pytest, cycloneDX sbom cosign signing, codeql security analysis, branch protection auto merge, always green ci, monorepo friendly ci, strict local gates mirror
👤 Author
CoderDeltaLAN (Yosvel) GitHub: https://github.com/CoderDeltaLAN
📄 License
Released under the MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ci_matrix_starter-0.1.6.tar.gz.
File metadata
- Download URL: ci_matrix_starter-0.1.6.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5626edfddaf5267981ea9c78fa67ccced69962eba4c8c9ac5fc64eb933fd063d
|
|
| MD5 |
f15c8e7a9aa86bd513564b8571e94531
|
|
| BLAKE2b-256 |
9a57199495e5d31274cab4279cc03106ffc0bca0ff22f564f9fbcaf58f1d3aaa
|
Provenance
The following attestation bundles were made for ci_matrix_starter-0.1.6.tar.gz:
Publisher:
publish-pypi.yml on CoderDeltaLAN/ci-matrix-starter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ci_matrix_starter-0.1.6.tar.gz -
Subject digest:
5626edfddaf5267981ea9c78fa67ccced69962eba4c8c9ac5fc64eb933fd063d - Sigstore transparency entry: 535104161
- Sigstore integration time:
-
Permalink:
CoderDeltaLAN/ci-matrix-starter@f1326db031111bf7259e616e5903e4da230e2c62 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/CoderDeltaLAN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f1326db031111bf7259e616e5903e4da230e2c62 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ci_matrix_starter-0.1.6-py3-none-any.whl.
File metadata
- Download URL: ci_matrix_starter-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32ca424d91d47b14eee03a0aea726d892ba8f430107de5511d89598e18e3b739
|
|
| MD5 |
9c23382eedf6d1ecdf5d9298c64b630e
|
|
| BLAKE2b-256 |
ad69810af43d88b50d55c54a704e9ea5e60a80eaa7e3e114b526542409d69d3d
|
Provenance
The following attestation bundles were made for ci_matrix_starter-0.1.6-py3-none-any.whl:
Publisher:
publish-pypi.yml on CoderDeltaLAN/ci-matrix-starter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ci_matrix_starter-0.1.6-py3-none-any.whl -
Subject digest:
32ca424d91d47b14eee03a0aea726d892ba8f430107de5511d89598e18e3b739 - Sigstore transparency entry: 535104241
- Sigstore integration time:
-
Permalink:
CoderDeltaLAN/ci-matrix-starter@f1326db031111bf7259e616e5903e4da230e2c62 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/CoderDeltaLAN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@f1326db031111bf7259e616e5903e4da230e2c62 -
Trigger Event:
push
-
Statement type: