chore(deps): update dependency @vue/eslint-config-prettier to v10 #2542
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: 百英雄伝攻略真書 | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- 'v*.*.*' | |
workflow_dispatch: | |
jobs: | |
eiyuden_chronicle_rewards: | |
name: 百英雄伝攻略真書 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: コードをチェックアウトする | |
uses: actions/checkout@v4 | |
- name: Node.js のセットアップを行う | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
cache: yarn | |
cache-dependency-path: yarn.lock | |
- name: $ yarn install する | |
run: yarn install | |
- name: $ yarn lint する | |
run: yarn lint | |
- name: $ yarn build が通るかチェックする | |
run: yarn build | |
- name: OCR をするために必要なパッケージをインストールする | |
run: | | |
sudo apt install -y tesseract-ocr libtesseract-dev tesseract-ocr-jpn fonts-migmix | |
mkdir -p ./output | |
- name: Webブラウザでの表示をチェックする(スクショ & OCR結果 の取得) | |
run: | | |
php -t dist/ -S localhost:8080 & | |
# Webサーバ が起きるまで待つ | |
until : > /dev/tcp/localhost/8080; do sleep 1; done | |
CHECK_URIS=( | |
'' | |
'rewards-gyakuhiki' | |
) | |
for CHECK_URI in "${CHECK_URIS[@]}"; do | |
echo "[LOG] CHECK_URI: ${CHECK_URI}" | |
npx capture-website --full-page http://localhost:8080/${CHECK_URI} --output=./output/screenshot_${CHECK_URI}.png | |
tesseract ./output/screenshot_${CHECK_URI}.png ./output/screenshot_ocr_${CHECK_URI} -l jpn txt | |
done | |
- name: Webブラウザでの表示をチェックする(チェックスクリプト実行) | |
run: | | |
# 文字列が存在しない場合はエラーを返すので CI が落ちる | |
echo '[LOG] grep -q "クラウドファンディング" ./output/screenshot_ocr_.txt' | |
grep -q "クラウドファンディング" ./output/screenshot_ocr_.txt | |
echo '[LOG] grep -q "パッケージ版ゲーム" ./output/screenshot_ocr_rewards-gyakuhiki.txt' | |
grep -q "パッケージ版ゲーム" ./output/screenshot_ocr_rewards-gyakuhiki.txt | |
echo '[LOG] grep -q "ネコを登場させられる" ./output/screenshot_ocr_rewards-gyakuhiki.txt' | |
grep -q "ネコを登場させられる" ./output/screenshot_ocr_rewards-gyakuhiki.txt | |
- name: capture-website-cli で撮影したスクショと OCR のテキストファイル を Artifacts に保存する | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: capture-website | |
path: output |