js13kGames automatic submission validation
In order to automate submission for the js13kgames.com challenge, the whole submission process is based on github Pull Request with a bot to check trivial things.
Table of content
If you want to submit an entry to the js13kgames.com, have a look at the How to submit
The section describes the internal implementation.
⚠️Knowledge on this is not required to submit your entry !
This project is a github app. It leverages octokit/rest to collect information.
Some artefacts are made publicly available throught a aws s3 bucket.
In order to test trivial issues, the game is run headlessly with browserstack.
Unfortunately since the release is on the submitter fork, and not part of the pull request, we cannot not have hook to trigger a check.
Which means we fallback on polling every X minutes.
The app does not rely on database.
However it is able to pull previous work from the pull request comment and avoid doing the work more than once.
The job start for a pull request (from cron or from manual trigger)
The bot get the latest release linked to the branch on the PR
It check if a check run exists for the release (the check run is bound to the release commit sha and the release id). If so, stop here
Else start the analysis:
Get the assets attached to the release
Look for a .zip
Check the size ( must be < 13k )
Look for an index.html
Upload the content of the zip
Run the game in browserstack
Look for errors in the console
Look for external http call ( which is forbidden )
Take a screenshot and determine if the screen is blank ( which probably means something is broken)
Report the analysis as check run for the release commit
Report the analysis as comment of the PR
PRs and issues welcome!
Join the js13kGames.slack.com to discuss new features!
This project uses typescript and prettier with default config.
Check type consistency with
yarn type and linting with
Run integration test with
It will run the bot against this pull requests samples.
You will need to have the env configured.
The app is backed by aws lambda. Using serverless to handle the deploy thingy.
yarn deploy will build the sources, package and deploy the bundle.
You will need to have the env configured, and serverless configured to target aws as well.