Skip to content

Avoid mutation of TTFont to fix issues with concurrent tests #1906

Avoid mutation of TTFont to fix issues with concurrent tests

Avoid mutation of TTFont to fix issues with concurrent tests #1906

Workflow file for this run

name: 🧑‍🔬 Lint & Test
on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- '**.md'
- '**.txt'
- '!requirements*.txt'
tags-ignore:
- '**'
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
- '**.txt'
- '!requirements*.txt'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm (otherwise the version is always 0.1.dev1)
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# For pytype we need everything
python -m pip install .[tests,docs]
python -m pip install glyphsLib
python -m pip install pytype # Not in requirements as it doesn't work on Windows
- name: Run black, pylint and pytype
run: |
black . --check --diff --color
pylint --recursive=true Lib tests
pytype
test:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm (otherwise the version is always 0.1.dev1)
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[tests,docs]
python -m pip freeze --all
- name: Install FontBakery
run: |
python -m pip install . --use-pep517
- name: Test with pytest
run: |
python -m pytest
- name: Run coverage (only Ubuntu/Python 3.10)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
python -m pytest --quiet --cov
- name: Ensure documentation can build (only Ubuntu/Python 3.10)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
run: |
cd docs; make html