Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Octocat Commit Catcher

A GitHub Campus Expert workshop

Catch commits, dodge bugs, climb the high score board.


NUS Hackers    Student Developer Pack    Become a Campus Expert


What is this?

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.

Running locally

Static (no backend)

Open app/static/index.html in your browser. Done.

With the Flask backend

pip install -r requirements.txt
python -m app.main

Then open http://localhost:5000.

With Docker

docker build -t octocat-game .
docker run -p 5000:5000 octocat-game

Running tests

Frontend (needs Node.js 18+):

node --test tests/test_logic.js

Backend (needs Python 3.10+):

pip install -r requirements.txt
pytest

Workshop lessons

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/.

Project structure

├── 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.

License

MIT

About

Repo for the GitHub Actions workshop at NUS

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages