Continuous Integration
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.
The Problem
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.
The Solution
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 has written extensive docs on caching with Circle CI.
- GitHub Actions allows you to keep everything in the GitHub ecosystem. They have docs on how to use caching with GitHub Actions.
- Travis CI has a nice set of docs on caching with Travis CI.
- GitLab has some solid docs on setting CI suite caching with GitLab.
- Bamboo from Atlassian has an article on how to set up caching with Bamboo.
- Jenkins doesn’t currently have a built in caching strategy so you’ll need to home bake one.
- Bitbucket Pipelines has docs on caching build dependencies.