This repo is a hands-on companion to a GitHub Actions workshop. The game runs entirely in the browser: Canvas rendering, game logic, localStorage high scores. There's also a Python/Flask backend that provides a score API, but the game works fine without it (open app/static/index.html in a browser and it just works).
The lessons/ folder walks through setting up GitHub Actions for this project, step by step.
Open app/static/index.html in your browser. Done.
pip install -r requirements.txt
python -m app.mainThen open http://localhost:5000.
docker build -t octocat-game .
docker run -p 5000:5000 octocat-gameFrontend (needs Node.js 18+):
node --test tests/test_logic.jsBackend (needs Python 3.10+):
pip install -r requirements.txt
pytest| Lesson | What it covers |
|---|---|
| 01: Frontend tests | Run JavaScript tests on every push and PR |
| 02: Deploy to GitHub Pages | Deploy the static game to Pages if tests pass |
| 03: Backend tests | Add Python tests alongside the JS tests |
| 04: Docker build & push | Build and push to GHCR if all tests pass |
| 05: Full pipeline | Everything in one file, with trade-off discussion |
Each lesson has a README and a workflow YAML you copy into .github/workflows/.
├── app/
│ ├── main.py Flask backend
│ └── static/
│ ├── index.html Game page (works standalone)
│ ├── info.html Resources page
│ ├── style.css Styles
│ ├── config.js Game settings (lives, items, colors)
│ ├── logic.js Game logic (shared with tests)
│ ├── game.js Rendering and game loop
│ └── img/ Octocat + Campus Expert assets
├── tests/
│ ├── test_logic.js Frontend tests (Node.js)
│ └── test_app.py Backend tests (pytest)
├── lessons/ Workshop lesson files
├── Dockerfile
├── requirements.txt
└── README.md
Want to test your Actions pipeline? Change something in config.js, commit, and watch your workflows run.
MIT