Eric Cornelissen

Hey there 👋 I'm software engineering and open source enthusiast with an interest in security and usability. You can find me and my work right here or at the links below.

SVGO Action

A GitHub Action to automatically run SVGO on SVGs in Pull Requests.

Description

I started this project to automate the SVG optimization process for the Simple Icons project and decided to do this project in TypeScript, which was a first for me (although I have worked with typed languages before). In the end, the project grew quite a bit until it was a fully configurable Action that can easily be used in other projects.

Since this project is a GitHub Action, I decided to use GitHub Actions as the main Continuous Integration (CI) service for this project, which was also a first for me. I set up a simple Workflow early on in the project that runs the build script, test script, and linting script. In addition, I later set up integration with both CodeCov and Code Climate to continuously monitor code coverage and code quality for the project.

To start this project of I created a proof of concept which finds SVGs in Pull Requests, runs SVGO on them using the standard configuration, and commits the result back. The first improvements to that where using an SVGO configuration that can be found in the repository. Gradually, I expanded the configurability of the Action with, among others: configurable commit messages, PR comments, and an ignore glob.

Back to top