-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
90 lines (86 loc) · 2.57 KB
/
action.yml
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
name: 'Font browser tests'
description: 'Test font rendering on different browsers'
inputs:
github-token:
description: 'Github token'
required: true
path:
description: 'Path to fonts'
required: true
fetch-before:
description: 'Fetch method for before fonts can be "googlefonts" or "github-release"'
default: "none"
repo:
description: "If fetch_before is github-release, specify username/repo e.g googlefonts/gulzar"
default: "none"
path-before:
description: 'Path to fonts before which reside inside the fetch dir'
default: "none"
out:
description: 'Output dir'
required: false
default: "test_results"
run-diffenator:
description: 'Run fontdiffenator'
default: false
run-diffbrowsers:
description: 'Run diffbrowsers'
default: false
user-wordlist:
description: 'Path to a wordlist file'
default: "none"
filter-styles:
description: 'Styles to display'
default: "none"
pt-size:
description: 'font pt size for diffbrowsers'
default: "20"
threshold:
description: 'Show changes over this percentage of changed pixels'
default: "20"
runs:
using: "composite"
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install packages
run: |
pip install git+https://github.com/googlefonts/diffenator2
shell: bash
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
- name: Setup Chrome Driver
uses: nanasess/setup-chromedriver@master
- name: Setup Firefox
uses: browser-actions/setup-firefox@latest
- name: Setup Firefox Driver
uses: browser-actions/setup-geckodriver@latest
with:
token: ${{ inputs.github-token }}
- name: Gen Screenshots
run: |
python -m youseedee 0x078A
chromedriver --url-base=/wd/hub &
python $GITHUB_ACTION_PATH/test.py \
--github-token ${{ inputs.github-token }} \
--path ${{ inputs.path }} \
--fetch-before ${{ inputs.fetch-before }} \
--repo ${{ inputs.repo }} \
--path-before '${{ inputs.path-before }}' \
--out ${{ inputs.out }} \
--diffenator ${{ inputs.run-diffenator }} \
--diffbrowsers ${{ inputs.run-diffbrowsers }} \
--user-wordlist ${{ inputs.user-wordlist }} \
--filter-styles '${{ inputs.filter-styles }}' \
--pt-size ${{ inputs.pt-size }}
env:
PYTHONIOENCODING: 'utf-8'
PYTHONUTF8: '1'
shell: bash
- name: Create Artifacts
uses: actions/upload-artifact@v2
with:
name: font-tests
path: ${{ inputs.out }}