My personal blog blog lucky pedantic
HEAD Latest release released

CircleCI CI nightly codecov Mutation Score Badge


This is my personal website/blog written using Lucky. Enjoy!

Setting up the project

  1. Run make dev-server to start the app
  2. Visit localhost:5000 in the browser


This is a bit of an experiment to be as pedantic about each and every bit of code as we can be realistically. The following checks are run (see also .circleci/config.yml):

| Check | Description | | ---- | ------------| | Static analysis| Checks for unused variables etc. Run with ./bin/ameba | | Code formatting | Can check formatting with crystal tool format --check and also autofix when omitting --check | | Unit tests | Run em with crystal spec | | Integration tests | Some of the tests hit the database and are not necessarily micro-test. Run em through the same runner with crystal spec | | Visual regression tests | Uses backstopjs. Was a bit trickier to get running smoothly on CI. Needs a few pointers, see below. Run with npm test | | CSS linting | Uses stylelint, run with rpm run lint | | Automated code review | Pull requests trigger a run of danger-js which looks for basics like PR descriptions, small-ish PRs. | | Accessibility testing | The chrome dev tools can analyse contrast etc. Run with npm run accessibility-test which uses a script heavily based on Google Chrome's a11y dev tools | | Security testing | On the frontend side we can make sure not to have major security holes in the dependencies, which is checked by npm audit | | Mutation testing | We can inject intentional code changes that must fail the test-suite to check if they do. This is using my own mutation test librabry crytic |

  • [ ] Performance testing

Visual regression testing

  • To generate reference images on the mac, run docker run --rm -v $(pwd):/src hanneskaeufler/crystal-node-ruby:0.25.1 backstop --config=/src/backstop.js
  • Switch the host in backstop.json to host.docker.internal:5000, see docker guides
  • To export the local visual regression test database, run /Applications/ --no-acl --no-owner --data-only --table=posts blog_visual_test > blog_visual_test.dump
  • Also, duh:

Learning Lucky

Lucky uses the Crystal programming language. You can learn about Lucky from the Lucky Guides.

Deploying manually

This project is continually deployed with a workflow on circleci. You can however deploy manually: Run git push heroku master. To export/import the database see:

Deploying locally with Docker

Start the database and app by running docker-compose up. Run docker-compose run app crystal -- db.migrate to setup the db.

  github: hanneskaeufler/blog
License MIT
Crystal 0.35.0


Dependencies 3

  • lucky ~> 0.22.0
    {'github' => 'luckyframework/lucky', 'version' => '~> 0.22.0'}
  • markd ~> 0.2.0
    {'github' => 'icyleaf/markd', 'version' => '~> 0.2.0'}
  • sitemapper ~> 0.6.0
    {'github' => 'jwoertink/sitemapper', 'version' => '~> 0.6.0'}

Development Dependencies 2

  • ameba ~> 0.12.0
    {'github' => 'veelenga/ameba', 'version' => '~> 0.12.0'}
  • crytic ~> 7
    {'github' => 'hanneskaeufler/crytic', 'version' => '~> 7'}

Dependents 0

Last synced .
search fire star recently