Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fontbakery installation and add support for fontbakery extras dependencies installation #211

Merged
merged 17 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
extends:
- wesbos

parser: "babel-eslint"

rules:
no-console:
- off
quotes: 0
prettier/prettier:
- singleQuote: false
env:
es2021: true
node: true
extends: eslint:recommended
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
55 changes: 28 additions & 27 deletions .github/workflows/action-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
name: Action CI
steps:
- name: Check out source repository
Expand All @@ -20,6 +20,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Update dependencies
run: python3 -m pip install --upgrade pip wheel setuptools
- name: Python environment report
Expand All @@ -28,29 +29,29 @@ jobs:
uses: f-actions/font-bakery@master
with:
subcmd: "--help"
- name: Action CI - default with single file
uses: f-actions/font-bakery@master
with:
subcmd: "check-profile"
args: "tests/check-test.py"
path: "tests/NotoSans-Regular.ttf"
- name: Action CI - default with wildcard path
uses: f-actions/font-bakery@master
with:
subcmd: "check-profile"
args: "tests/check-test.py"
path: "tests/*.ttf"
- name: Action CI - fontbakery main branch version
uses: f-actions/font-bakery@master
with:
subcmd: "check-profile"
args: "tests/check-test.py"
path: "tests/*.ttf"
version: "main"
- name: Action CI - fontbakery pinned release version
uses: f-actions/font-bakery@master
with:
subcmd: "check-profile"
args: "tests/check-test.py"
path: "tests/*.ttf"
version: "0.7.25"
# - name: Action CI - default with single file
# uses: f-actions/font-bakery@master
# with:
# subcmd: "check-profile"
# args: "tests/check-test.py"
# path: "tests/NotoSans-Regular.ttf"
# - name: Action CI - default with wildcard path
# uses: f-actions/font-bakery@master
# with:
# subcmd: "check-profile"
# args: "tests/check-test.py"
# path: "tests/*.ttf"
# - name: Action CI - fontbakery main branch version
# uses: f-actions/font-bakery@master
# with:
# subcmd: "check-profile"
# args: "tests/check-test.py"
# path: "tests/*.ttf"
# version: "main"
# - name: Action CI - fontbakery pinned release version
# uses: f-actions/font-bakery@master
# with:
# subcmd: "check-profile"
# args: "tests/check-test.py"
# path: "tests/*.ttf"
# version: "0.7.25"
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["12"]
node: ["18"]
name: Node ${{ matrix.node }} eslint run
steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
*.pyc
.vscode
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## v3.0.0

- [Backwards incompatible with fontbakery < v0.9.0] added default support for the fontbakery all extras dependencies installation at fontbakery install
- [Backwards incomaptible with f-actions/font-bakery@v2 and earlier] Made the `path` font path input mandatory and removed the default definition if this is not defined
- removed a number of unnecessary node dev depependencies
- revised the eslint configuration on the JS source lints
- updated estlint CI testing to use a node20 environment (from node16 which is deprecated)
- updated Makefile dev-update target to use the updated npm option definition approach to developer dependency updates
- updated Makefile dist target to include `--legacy-peer-deps` and `NODE_OPTIONS=--openssl-legacy-provider` options at distribution JS file build time
- updated the README link to the fontbakery project which has moved to the fonttools org from the googlefonts org since our last release here

## v2.0.0

- change `version` configuration input field "master" definition to "main" (**Note**: backwards incompatible change for users who were previous users of the "master" definition)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
dist: src/*.js package*.json
npm i && npm run package
npm i --legacy-peer-deps && NODE_OPTIONS=--openssl-legacy-provider npm run package

update:
npm update

dev-update:
npm update --dev
npm update --include=dev

lint:
npm run lint
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Action CI](https://github.com/f-actions/font-bakery/workflows/Action%20CI/badge.svg)](https://github.com/f-actions/font-bakery/actions?query=workflow%3A%22Action+CI%22)
[![Lint](https://github.com/f-actions/font-bakery/workflows/Lint/badge.svg)](https://github.com/f-actions/font-bakery/actions?query=workflow%3ALint)

This GitHub Action installs the [googlefonts/fontbakery](https://github.com/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.
This GitHub Action installs the [googlefonts/fontbakery](https://github.com/fonttools/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.8+ runner environment.

## Quick Start

Expand Down Expand Up @@ -33,17 +33,17 @@ jobs:
- name: Build fonts
run: make # enter your build shell commands here
- name: fontbakery TTF checks
uses: f-actions/font-bakery@v2
uses: f-actions/font-bakery@v3
with:
subcmd: "check-universal" # fontbakery sub-command
args: "--loglevel WARN" # optional arguments to fontbakery
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/font-bakery@v2
uses: f-actions/font-bakery@v3
with:
subcmd: "check-universal" # fontbakery sub-command
args: "--loglevel WARN" # optional arguments to fontbakery
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
```
Expand All @@ -66,7 +66,7 @@ args: "--loglevel WARN"

### `path`

**Optional** The path to the font file(s). You may use wildcards in this path definition. Default: `build` directory
**Mandatory** The path to the font file(s). You may use wildcards in this path definition.

```
path: "path/to/*.ttf"
Expand All @@ -84,6 +84,8 @@ subcmd: "check-universal"

### `version`

**Please note**: If you define installations of fontbakery < v0.9.0 with this input field, you must remain on the `v2` branch of this GitHub Action. We introduced backwards incompatible changes that will not work with the installation of fontbakery versions < v.0.9.0 as of the `v3.0.0` Action release.

**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.
Expand Down
5 changes: 2 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ description: "Font Bakery QA testing"
inputs:
path: # id
description: "Path to build artifact testing directory"
required: false
default: "build"
required: true
subcmd: # id
description: "Font Bakery subcommand"
required: true
Expand All @@ -18,7 +17,7 @@ inputs:
default: "latest"

runs:
using: "node16"
using: "node20"
main: "dist/index.js"

branding:
Expand Down
Loading