Skip to content

Commit 1605af8

Browse files
committed
feat(ci): add minimal GitHub workflow and document template structure
- add .github/workflows/ci.yml to build dev and app images - run ruff check, ruff format --check, and pytest in CI - document GitHub CI checks in README - add a short project structure section for template users
1 parent 3ddf7af commit 1605af8

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-check:
14+
runs-on: ubuntu-latest
15+
env:
16+
DOCKER_PLATFORM: linux/amd64
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
21+
- name: Set up Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Build dev and app images
25+
run: docker compose build dev app
26+
27+
- name: Ruff lint
28+
run: docker compose run --rm dev ruff check .
29+
30+
- name: Ruff format check
31+
run: docker compose run --rm dev ruff format --check .
32+
33+
- name: Run tests
34+
run: docker compose run --rm dev pytest -q

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
* [About the Template](#about-the-template)
1111
* [Features](#features)
12+
* [Project Structure](#project-structure)
1213
* [Tested with](#tested-with)
1314
* [Prerequisites](#prerequisites)
1415
* [Quickstart](#quickstart)
@@ -20,6 +21,7 @@
2021
* [5. Update dependencies when needed](#5-update-dependencies-when-needed)
2122
* [Build and run your application](#build-and-run-your-application)
2223
* [Optional: Use `dev` for checks and experiments](#optional-use-dev-for-checks-and-experiments)
24+
* [GitHub CI checks](#github-ci-checks)
2325
* [Optional: Run Codex or Gemini (see more examples below)](#optional-run-codex-or-gemini-see-more-examples-below)
2426
* [Optional: Run JupyterLab](#optional-run-jupyterlab)
2527
* [💻 AI-Powered CLI Workflow (Gemini & Codex)](#-ai-powered-cli-workflow-gemini--codex)
@@ -69,6 +71,22 @@ Use it as-is or tailor it to match your team's development workflow.
6971
* Simple to extend with Jupyter, SQL drivers, and more
7072
* Works identically on any machine with Docker
7173

74+
## Project Structure
75+
76+
```text
77+
.
78+
├── .github/workflows/ci.yml # GitHub CI: build dev/app, run Ruff + pytest
79+
├── src/sample/main.py # Example application module
80+
├── tests/sample/test_main.py # Example pytest tests to extend in your project
81+
├── Dockerfile # Multi-stage images (base, dev, vim-ide, app)
82+
├── compose.yaml # Local service orchestration for template workflows
83+
├── pyproject.toml # Poetry dependencies and tool configuration
84+
├── poetry.lock # Locked dependency graph
85+
└── README.md # Setup and usage documentation
86+
```
87+
88+
This layout is intentionally minimal so it can be extended for any project.
89+
7290
## Tested with
7391

7492
* **Docker**: `27.3.1``29.2.1`
@@ -213,6 +231,18 @@ docker compose run --rm dev ruff check
213231
docker compose run --rm dev ruff format --check
214232
```
215233

234+
### GitHub CI checks
235+
236+
This template includes a minimal GitHub Actions workflow in
237+
`.github/workflows/ci.yml` that:
238+
239+
* builds `dev` and `app` images
240+
* runs `ruff check .`
241+
* runs `ruff format --check .`
242+
* runs `pytest -q`
243+
244+
The same pattern can be easily extended for any other CI system.
245+
216246
If you’re running as the non-root user and want to try extra system packages
217247
before baking them into the image, use `sudo`:
218248

0 commit comments

Comments
 (0)