NVDAチートシートの更新に対応 #238
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
pull_request | |
jobs: | |
schema_validation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install node modules | |
run: npm install | |
- name: Validate changed schema and data files | |
run: | | |
TARGET_BRANCH="${{ github.base_ref }}" | |
CHANGED_FILES=$(git diff --name-only --diff-filter=AMR origin/$TARGET_BRANCH HEAD) | |
for FILE in $CHANGED_FILES | |
do | |
echo "$FILE" | |
case "$FILE" in | |
data/json/schemas/common.json) | |
npx ajv compile --spec=draft2020 -s ${FILE} | |
;; | |
data/json/schemas/check.json) | |
npx ajv compile --spec=draft2020 -s ${FILE} -r data/json/schemas/common.json | |
;; | |
data/json/schemas/guideline.json) | |
npx ajv compile --spec=draft2020 -s ${FILE} -r data/json/schemas/common.json | |
;; | |
data/json/schemas/faq.json) | |
npx ajv compile --spec=draft2020 -s ${FILE} -r data/json/schemas/common.json | |
;; | |
data/yaml/gl/*.yaml) | |
npx ajv validate --spec=draft2020 -s data/json/schemas/guideline.json -r data/json/schemas/common.json -d ${FILE} | |
;; | |
data/yaml/checks/*.yaml) | |
npx ajv validate --spec=draft2020 -s data/json/schemas/check.json -r data/json/schemas/common.json -d ${FILE} | |
;; | |
data/yaml/faq/*.yaml) | |
npx ajv validate --spec=draft2020 -s data/json/schemas/faq.json -r data/json/schemas/common.json -d ${FILE} | |
;; | |
esac | |
done | |
sphinx_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.x' | |
- name: Install the Latest pip | |
run: python -m pip install --upgrade pip | |
- name: install ja_JP.UTF-8 locale | |
run: | | |
sudo locale-gen ja_JP.UTF-8 | |
sudo update-locale LANG=ja_JP.UTF-8 | |
- name: Install required modules | |
run: python -m pip install -r requirements.txt --upgrade | |
- name: Build HTML | |
env: | |
BASE_URL: https://a11y-guidelines.freee.co.jp/ | |
TZ: JST-9 | |
run: make sphinx_options="-W" clean html | |
- name: Check for unreferenced include files | |
run: make check-includes | |
- name: Run sphinx-lint | |
run: | | |
sphinx-lint --enable all --disable line-too-long ./ja/source | |
sphinx-lint --enable all --disable line-too-long ./en/source |