-
Notifications
You must be signed in to change notification settings - Fork 74
84 lines (80 loc) · 2.91 KB
/
test.yml
File metadata and controls
84 lines (80 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEV_FAMILY_DOWNLOAD: ${{ secrets.DEV_FAMILY_DOWNLOAD }}
DEV_META_URL: ${{ secrets.DEV_META_URL }}
DEV_URL: ${{ secrets.DEV_URL }}
DEV_VERSIONS_URL: ${{ secrets.DEV_VERSIONS_URL }}
PRODUCTION_META_URL: ${{ secrets.PRODUCTION_META_URL }}
PRODUCTION_URL: ${{ secrets.PRODUCTION_URL}}
PRODUCTION_VERSIONS_URL: ${{ secrets.PRODUCTION_VERSIONS_URL }}
SANDBOX_FAMILY_DOWNLOAD: ${{ secrets.SANDBOX_FAMILY_DOWNLOAD }}
SANDBOX_META_URL: ${{ secrets.SANDBOX_META_URL }}
SANDBOX_URL: ${{ secrets.SANDBOX_URL }}
SANDBOX_VERSIONS_URL: ${{ secrets.SANDBOX_VERSIONS_URL }}
TRAFFIC_JAM_ID: ${{ secrets.TRAFFIC_JAM_ID }}
STATUS_FIELD_ID: ${{ secrets.STATUS_FIELD_ID }}
LIST_FIELD_ID: ${{ secrets.LIST_FIELD_ID }}
PR_GF_ID: ${{ secrets.PR_GF_ID }}
IN_DEV_ID: ${{ secrets.IN_DEV_ID }}
IN_SANDBOX_ID: ${{ secrets.IN_SANDBOX_ID }}
LIVE_ID: ${{ secrets.LIVE_ID }}
TO_SANDBOX_ID: ${{ secrets.TO_SANDBOX_ID }}
TO_PRODUCTION_ID: ${{ secrets.TO_PRODUCTION_ID }}
BLOCKED_ID: ${{ secrets.BLOCKED_ID }}
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.13", "3.14"]
platform: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Cairo (Ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install libcairo2-dev
- name: Install ffmpeg (Ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: sudo apt-get install ffmpeg
- name: Install ffmpeg (Windows)
if: matrix.platform == 'windows-latest'
run: choco install ffmpeg -y
shell: pwsh
# Temporarily skip QA extra on Python 3.14 until skia-python provides wheels for 3.14.
# The qa extra pulls in diffenator2 which depends on blackrenderer[skia] which in turn
# depends on skia-python. Building skia-python from source fails on CI.
# See: https://github.com/googlefonts/gftools/pull/1160
- name: Install packages (with QA)
if: matrix.python-version != '3.14'
run: |
pip install '.[qa,test]'
- name: Install packages (without QA)
if: matrix.python-version == '3.14'
run: |
pip install '.[test]'
- name: lint
run: |
black . --check --diff --color
- name: Run Server Tests
if: github.event.pull_request.head.repo.fork == false
run: |
pytest tests/push/*.py
shell: bash
- name: Run Tests
run: |
pytest tests/*.py
shell: bash