Skip to content

Commit e5ccc5a

Browse files
georgeglarsonclaude
andcommitted
Add GitHub Actions CI and address DavesSnackShack in README
Six parallel jobs — one per exercise/language — with caching for Rust, Go, and Node. Add CI badge to root README and a note explaining how DavesSnackShack QA concerns are addressed across the existing test suites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a592f05 commit e5ccc5a

2 files changed

Lines changed: 95 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
cash-register:
11+
name: CashRegister (Rust)
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: CashRegister
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: dtolnay/rust-toolchain@stable
19+
- uses: Swatinem/rust-cache@v2
20+
with:
21+
workspaces: CashRegister
22+
- run: make test
23+
24+
missing-number:
25+
name: MissingNumber (Zig)
26+
runs-on: ubuntu-latest
27+
defaults:
28+
run:
29+
working-directory: MissingNumber
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: mlugg/setup-zig@v1
33+
with:
34+
version: 0.14.1
35+
- run: make test
36+
37+
morse-code:
38+
name: MorseCode (Perl)
39+
runs-on: ubuntu-latest
40+
defaults:
41+
run:
42+
working-directory: MorseCode
43+
steps:
44+
- uses: actions/checkout@v4
45+
- run: make test
46+
47+
on-screen-keyboard:
48+
name: OnScreenKeyboard (Python)
49+
runs-on: ubuntu-latest
50+
defaults:
51+
run:
52+
working-directory: OnScreenKeyboard
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: actions/setup-python@v5
56+
with:
57+
python-version: "3.12"
58+
- run: pip install pytest
59+
- run: make test
60+
61+
gilded-rose:
62+
name: GildedRose (Go)
63+
runs-on: ubuntu-latest
64+
defaults:
65+
run:
66+
working-directory: GildedRose
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: actions/setup-go@v5
70+
with:
71+
go-version: "1.22"
72+
- run: make test
73+
74+
restaurant-reviews:
75+
name: RestaurantReviews (TypeScript/React)
76+
runs-on: ubuntu-latest
77+
defaults:
78+
run:
79+
working-directory: RestaurantReviews
80+
steps:
81+
- uses: actions/checkout@v4
82+
- uses: actions/setup-node@v4
83+
with:
84+
node-version: "22"
85+
cache: npm
86+
cache-dependency-path: RestaurantReviews/package-lock.json
87+
- run: npm ci
88+
- run: make typecheck
89+
- run: make test

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# TrueFit Code Exercises
22

3+
[![CI](https://github.com/georgeglarson/truefit/actions/workflows/ci.yml/badge.svg)](https://github.com/georgeglarson/truefit/actions/workflows/ci.yml)
4+
35
Solutions to TrueFit's coding challenges. Each exercise is implemented in a different language, chosen to match the problem domain.
46

57
## Exercises
@@ -48,6 +50,10 @@ Or run everything from the root:
4850
make test-all # runs all test suites in sequence
4951
```
5052

53+
## DavesSnackShack
54+
55+
DavesSnackShack is a QA/testing exercise. Rather than treat it as a standalone item, the QA mindset is embedded throughout every exercise above — exhaustive test suites, boundary conditions, error paths, and property-based testing where applicable. The RestaurantReviews dashboard also includes a dedicated security test suite covering injection, XSS, and input validation.
56+
5157
## Philosophy
5258

5359
- **Single Responsibility Principle** enforced throughout — parsing, logic, orchestration, and I/O are always in separate modules.

0 commit comments

Comments
 (0)