Github Actions as a Number
Let's calculate something!
Let's consider a large project that is running GitHub Actions for unit tests.
A single job of unit tests take about minutes.
This job runs in a paralle grid of size .
That means that each commit can trigger a job that takes minutes.
This is just a single commit though.
Let's also consider that on average each PR contains commits.
If we now assume that our project has pull requests per day.
Then our GitHub Actions bill will be:
$ per day
$ per month (assuming 20 work days)
$ per year (assuming 50 work weeks)
What's in a number?
Now let's wonder. Is this a big number? I've been wondering about this number mainly because I wonder when the number is big enough for people to care. Tech teams are usually more concerned about velocity, which is a totally valid concern. The salary of a developer might still pale in comparison to the GitHub bill so it makes sense to prioritize.
At the same time though ... it's a lot of compute! We shouldn't waste it just because there's budget for it. It's making me wonder what tools might be made that can help folks keep these compute times down. I've made pytest-duration-insights as a first step for python tests but I'm wondering if I can do more on a Github-level.
GitHub is interesting because it's not a cloud provider. It's too small for something like the duckbill group. The costs are substantial enough to make me wonder about what could be done though.
How it's made
This was made with tangle.js. It's a tool from 2011 that's still great at interactive documents.