Starter de CI matrix (Poetry + src layout)
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. 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.
Repo layout
.
├── .github/workflows/
│ ├── build.yml # aggregator (example)
│ ├── codeql.yml # CodeQL analysis
│ ├── supply-chain.yml # SBOM + weekly gates
│ ├── release-sbom.yml # release SBOM publish
│ ├── ghcr-publish.yml # container to GHCR (example)
│ ├── release-drafter.yml # release notes draft
│ ├── auto-assign.yml # auto-assign reviewers
│ ├── labeler.yml # PR labeler
│ ├── dependabot-automerge.yml # auto-merge Dependabot
│ ├── ts-ci.yml # reusable TypeScript/Node CI
│ ├── py-ci.yml # reusable Python CI
│ └── py-ci-badge.yml # wrapper for README badge
├── docs/
│ └── screens/
│ └── local-sanity.png # terminal screenshot (example)
├── src/
│ ├── index.ts # minimal TS example
│ └── ci_matrix_starter/ # minimal Py package
├── tests/ # Python tests (example)
├── package.json # Node scripts
├── pyproject.toml # Python tooling
└── README.md
🖥️ Operating System Compatibility ✅
| OS | Status |
|------------------|:------:|
| Linux | ✅ |
| macOS | ✅ |
| Windows (WSL2) | ✅ |
| FreeBSD | ✅ |
| Android (Termux) | ✅ |
| Containers (CI) | ✅ |
🚀 Quick Start (consumers)
Use the reusable workflows in your repo
Create .github/workflows/ci.yml:
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.7
with:
python_versions: '["3.11","3.12"]'
run_tests: true
# TypeScript / Node 20
ts:
uses: CoderDeltaLAN/ci-matrix-starter/.github/workflows/ts-ci.yml@v0.1.7
The aggregator in this repo (
build.yml) shows 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
📦 What the workflows expect
TypeScript
package.jsonwithtestscript.tsconfig.json(scope sources, e.g.,src/**/*.ts).eslint.config.mjs(flat) and Prettier 3.- Node 20.x.
Python
pyproject.tomlwith dev tools (ruff, black, pytest, mypy, poetry).- Tests under
tests/; coverage threshold viacov-min. Matrix 3.11/3.12 (customizable withpython_versions).
Optional SBOM & signing
- SBOMs (CycloneDX) available. If
COSIGN_KEY&COSIGN_PASSWORDare present, images/artifacts can be signed (safe-by-default: skipped when absent).
⛳ Required checks (CI gating)
Suggested branch-protection contexts:
CI / build(aggregator success)CodeQL Analyze / codeql
Enable linear history, dismiss stale reviews on new pushes, and auto-merge when green.
🧪 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
👨💻 Local sanity (screenshot)
🔧 CI (GitHub Actions)
- Reusable jobs for Python and TypeScript; call them via
uses:with a tag (e.g.,@v0.1.7). - Built-in CodeQL example.
- Strict, fast feedback suitable for PR auto-merge when green.
Python snippet
- 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 snippet
- 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 referenced by tag.
- You value security (CodeQL), SBOMs, and strict gates to keep
mainalways green.
🧩 Customization
- Pin a release tag, e.g.,
@v0.1.7. - Adjust Python matrix:
with.python_versions. - Toggle tests in the wrapper:
with.run_tests(true/false). - Provide secrets to enable optional cosign signing.
- Extend jobs by adding steps after
uses:.
🔒 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 review.
- Use auto-merge once checks pass.
💚 Donations & Sponsorship
Support open-source: your donations keep projects clean, secure, and evolving for the global community.
🔎 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.10.tar.gz.
File metadata
- Download URL: ci_matrix_starter-0.1.10.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
376de297191bbe1b8194888aab542ae96a0b727ef53ecaf344f02d77f629c0e6
|
|
| MD5 |
6bff3ce725094792e9647e5ddb457111
|
|
| BLAKE2b-256 |
d369ecd285e0d6f902b683148fd1cc84e70fdb9257cfa8d82203226898652468
|
Provenance
The following attestation bundles were made for ci_matrix_starter-0.1.10.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.10.tar.gz -
Subject digest:
376de297191bbe1b8194888aab542ae96a0b727ef53ecaf344f02d77f629c0e6 - Sigstore transparency entry: 547582372
- Sigstore integration time:
-
Permalink:
CoderDeltaLAN/ci-matrix-starter@36cebee56237f56da73faf784fd1c7b220e23dbe -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/CoderDeltaLAN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@36cebee56237f56da73faf784fd1c7b220e23dbe -
Trigger Event:
release
-
Statement type:
File details
Details for the file ci_matrix_starter-0.1.10-py3-none-any.whl.
File metadata
- Download URL: ci_matrix_starter-0.1.10-py3-none-any.whl
- Upload date:
- Size: 5.7 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 |
77db9a64999d31a1348bd91e9c502a3cab0cb746f846c9409760dce70b3182f5
|
|
| MD5 |
50a480ede8462e01b298fdd39661acce
|
|
| BLAKE2b-256 |
43fd6afb840197e2ca47bd37c40d73d8972c9003f43dd11baa5f3aeccdcdb8cb
|
Provenance
The following attestation bundles were made for ci_matrix_starter-0.1.10-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.10-py3-none-any.whl -
Subject digest:
77db9a64999d31a1348bd91e9c502a3cab0cb746f846c9409760dce70b3182f5 - Sigstore transparency entry: 547582378
- Sigstore integration time:
-
Permalink:
CoderDeltaLAN/ci-matrix-starter@36cebee56237f56da73faf784fd1c7b220e23dbe -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/CoderDeltaLAN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@36cebee56237f56da73faf784fd1c7b220e23dbe -
Trigger Event:
release
-
Statement type: