Circle CI - custom workflow

We are rails workshop and doing continuous integration on CircleCI.

Business requirements

Our app is serving customers from different countries. Internationalization is key in our app. Rails provides very good support for i18n and takes care of most.

However we have loop whole in our workflow where devs tend to push I18n files with incomplete information, i.e. setting up messages for EN version and left incomplete for other countries. We tried to tighten the process to ensure I18n files are always updated with all language versions.

Since devs are not good at messaging part, during the development we setup yaml file with draft version in English, and keeping other language empty (Chinese, Japanese parts blank to be filled). like

There are cases we miss the messages and customers caught in production 🤯

Setting up custom workflows..

Since CI provides 1-to-many jobs under workflow, we have configured custom workflow to catch above.

When dev makes a commit and push to Github; it automatically triggers build (Straightforward). In CI workflow we do following.

  • Run test suite (rspec or minitest)
  • Run rubocop (coding standards)
  • Run translations checks..

For each build → it triggers above jobs in parallel. As you can see we have “Translations Checks” Job.. The way it configured in circle.yml configuration as be

configure rake task for translations

configure i18n checker

Now we have integrated I18n incorrect files as part of CI. 🔗And in github we enabled “translations” check as “required”. This worked well for us 💯..

Above is example of how we integrated custom job with circle ci and github checks.. It may not be same for your applications, but you can do other custom checks based on your needs..

Hope above helpful..

I am rails developer, also leading development team to build application to serve customers from multiple regions.