CI environments can pull a lot of bandwidth. So, how can you follow best practices with your chosen suite of tests without hitting the ceiling of your monthly npm bandwidth limits? With caching! Read on, and we’ll show you how.
We've gathered caching how-to's for some of the most popular CI options on the market today to make it easy and performant to use Font Awesome in your projects.
Every time you push code and your test suite runs, it will pull your packages for each test run. If you’re anything like us, you push a lot of commits. The problem is all those commits add up quickly, which means you’ll be hitting your npm bandwidth limit before you know it. You need a caching strategy. Here’s what to do.
Set up your packages to be cached in your chosen CI solution. Once you set up caching, it will only pull packages when something in the package (like a version) changes. This cuts down on bandwidth usage significantly and may also speed up run times on your test suite.
Below are links to the docs for some of the most popular CI solutions on the market today:
- CircleCI (opens new window) has written extensive docs on caching with Circle CI (opens new window).
- GitHub Actions (opens new window) allows you to keep everything in the GitHub ecosystem. They have docs on how to use caching with GitHub Actions (opens new window).
- Travis CI (opens new window) has a nice set of docs on caching with Travis CI (opens new window).
- GitLab (opens new window) has some solid docs on setting CI suite caching with GitLab (opens new window).
- Bamboo (opens new window) from Atlassian has an article on how to set up caching with Bamboo (opens new window).
- Jenkins (opens new window) doesn't currently have a built in caching strategy so you'll need to home bake one.