This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
chore(deps): replace dependency @material-ui/icons with @mui/icons-ma… #1390
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: 幻水総選挙2021(フロントエンド) | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- 'v*.*.*' | |
jobs: | |
gensosenkyo_2021_frontend: | |
name: 幻水総選挙2021(フロントエンド) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# node-version: ['14.x', '16.x', '18.x'] | |
node-version: ['14.21.1'] | |
steps: | |
- name: コードをチェックアウトする | |
uses: actions/checkout@v3 | |
- name: Node.js のセットアップを行う | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
cache-dependency-path: yarn.lock | |
- name: $ yarn install を行う | |
run: | | |
yarn install | |
- name: $ yarn build が通るかチェックする | |
run: | | |
yarn build | |
- name: OCR をするために必要なパッケージをインストールする | |
run: | | |
sudo apt install -y tesseract-ocr libtesseract-dev tesseract-ocr-jpn fonts-migmix | |
mkdir -p ./screenshots | |
- name: Webブラウザで JavaScript が解釈されて期待どおりに表示されているかを簡易チェックする | |
run: | | |
php -t build/ -S localhost:8080 & | |
# Webサーバ が起きるまで待つ | |
until : > /dev/tcp/localhost/8080; do sleep 1; done | |
npx capture-website http://localhost:8080 --output=screenshots/screenshot.png | |
tesseract screenshots/screenshot.png screenshot_ocr -l jpn txt | |
# 文字列が存在しない場合はエラーを返すので CI が落ちる | |
grep -q "総選挙" screenshot_ocr.txt | |
- name: capture-website-cli で撮影したスクショを Artifacts に保存する | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: capture-website | |
path: screenshots |