Skip to content

Commit

Permalink
Change: CIでのエンジンポートを変更 (#1726)
Browse files Browse the repository at this point in the history
* Change: CIで使うポートを変更

* Code: TODOを追加

* Change: ランダムポートに

* Apply suggestions from code review

---------

Co-authored-by: Hiroshiba <[email protected]>
  • Loading branch information
sevenc-nanashi and Hiroshiba authored Jan 20, 2024
1 parent ab7bd48 commit 09f6335
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ jobs:
# .env
sed -i -e 's|"074fc39e-678b-4c13-8916-ffca8d505d1d"|"208cf94d-43d2-4cf5-abc0-9783cac36d29"|' .env.test
sed -i -e 's|"../voicevox_engine/run.exe"|"${{ steps.download-engine.outputs.run_path }}"|' .env.test
sed -i -e 's|"executionArgs": \[\],|"executionArgs": ["--port=50021"],|' .env.test
# GitHub Actions 環境だとたまに50021が封じられていることがあるので、ランダムなポートを使うようにする
PORT=$(node -r net -e "server=net.createServer();server.listen(0,()=>{console.log(server.address().port);server.close()})")
sed -i -e 's|"host": "http://127.0.0.1:50021"|"host": "http://127.0.0.1:'$PORT'"|' .env.test
sed -i -e 's|"executionArgs": \[\],|"executionArgs": ["--port='$PORT'"],|' .env.test
cp .env.test .env
- name: Check if commit message includes [update snapshots]
Expand Down

0 comments on commit 09f6335

Please sign in to comment.