A GitHub Action for continuous integration testing with the googlefonts/fontbakery font quality assurance tool
This GitHub Action installs the googlefonts/fontbakery typeface project quality assurance tool and executes the tool on a user-specified filepath as part of a remote continuous integration testing pipeline. The Action requires a Python v3.6+ runner environment.
Create a yaml formatted GitHub Actions configuration file on the directory path
.github/workflows in your source repository. Please review the GitHub Actions documentation for detailed instructions on the configuation file syntax.
Please note: These steps require that the fonts are built in your CI workflow before the fontbakery testing steps are executed or are under git version control and pushed to a remote source repository directory path. The example below assumes a Makefile based build that uses the default make target. Customize the build command with the approach that you use in your project.
name: Font Bakery QA Tests on: [push, pull_request] jobs: fontbakery: runs-on: ubuntu-latest name: Font Bakery QA tests # Customize to edit the string in your GitHub CI UI steps: - name: Check out source repository uses: actions/[email protected] - name: Set up Python environment uses: actions/[email protected] with: python-version: "3.11" # supports any Py3.6+ version available in Actions - name: Build fonts run: make # enter your build shell commands here - name: fontbakery TTF checks uses: f-actions/[email protected] with: subcmd: "check-universal" # fontbakery sub-command args: "--loglevel WARN" # optional arguments to fontbakery path: "path/to/*.ttf" # font path relative to root of repository version: "latest" # optional, latest PyPI release is default - name: fontbakery OTF checks uses: f-actions/[email protected] with: subcmd: "check-universal" # fontbakery sub-command args: "--loglevel WARN" # optional arguments to fontbakery path: "path/to/*.otf" # font path relative to root of repository version: "latest" # optional, latest PyPI release is default
See the Inputs section below for details on default inputs and optional configuration settings.
Configure the Action with the following settings:
Optional The non-path arguments to the fontbakery executable sub-command. For example, this is a location where the log level may be set. The setting below limits reporting to log levels of WARN and higher:
args: "--loglevel WARN"
See the fontbakery help menus for details on available options.
Optional The path to the font file(s). You may use wildcards in this path definition. Default:
Mandatory The fontbakery sub-command. This specifies the test profile that is executed on your fonts.
fontbakery --help or the fontbakery documentation for additional details.
Optional The fontbakery version that should be used for testing. This supports PyPI releases and direct source repository master branch installations.
Default: “latest” = latest PyPI release version.
"0.7.28"(this approach pins the fontbakery package at a release version number)