-
Notifications
You must be signed in to change notification settings - Fork 2.6k
136 lines (121 loc) · 3.77 KB
/
test.yaml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Google Fonts QA
on:
pull_request:
branches:
- main
jobs:
diffbrowsers:
name: Build Google Fonts
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.10']
os: [windows-latest, macos-12, ubuntu-latest]
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Install packages
run: |
pip install gftools[qa] pytest
shell: bash
- name: Setup Chrome
uses: browser-actions/[email protected]
with:
chrome-version: '127.0.6509.0'
- name: Setup Chrome Driver
uses: nanasess/[email protected]
- name: Setup Firefox
uses: browser-actions/setup-firefox@latest
- name: Setup Firefox Driver
uses: browser-actions/setup-geckodriver@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Diffbrowsers
run: |
mkdir out
python -m youseedee 0x078A
chromedriver --url-base=/wd/hub &
python3 .ci/run.py --render
env:
PYTHONIOENCODING: 'utf-8'
PYTHONUTF8: '1'
shell: bash
- name: Check file existence
id: check_files
uses: andstor/[email protected]
with:
files: "out"
- name: Upload check results
if: steps.check_files.outputs.files_exists == 'true'
uses: actions/upload-artifact@v3
with:
name: qa
path: out/
diffenator:
name: Diffenate fonts
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Install packages
# The --pre flag below will ensure we use the latest Font Bakery pre-releases
# and benefit from its newest checks:
run: |
pip install --upgrade pip
pip install --pre fontbakery[googlefonts]
pip install gftools[qa] pytest
shell: bash
- name: Run Diffenator and Fontbakery
run: |
mkdir out
python -m youseedee 0x078A
python3 .ci/run.py --pr-number $PR_NUMBER --pr-url-body https://www.github.com/google/fonts/pull/
env:
PYTHONIOENCODING: 'utf-8'
PYTHONUTF8: '1'
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.number }}
shell: bash
- name: Check file existence
id: check_files
uses: andstor/[email protected]
with:
files: "out"
- name: Upload check results
if: steps.check_files.outputs.files_exists == 'true'
uses: actions/upload-artifact@v3
with:
name: qa
path: out/
ftxvalidator:
name: Run ftxvalidator on new/changed fonts
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Download and install
run: |
${{secrets.OBTAIN_FONTTOOLS}}
hdiutil attach font_tools.dmg
sudo installer -pkg /Volumes/macOS\ Font\ Tools/macOS\ Font\ Tools.pkg -target /
hdiutil detach /Volumes/macOS\ Font\ Tools
- name: Set up Python 3.10
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Test font with ftxvalidator
run: python3 .ci/ftxvalidator.py