perf: Chrome for Testingとaction依存をactions/cacheでキャッシュ - #8
Merged
Conversation
composite action内訳の実測(chromagic-demoでの計測): - Install Japanese fonts: 約11.3秒 - Setup Chrome for Testing: 約7.5秒 - Install action dependencies (npm ci): 約4秒 - Capture stories (storycap): 約7.2秒 browser-actions/setup-chromeはRUNNER_TOOL_CACHE配下にキャッシュする作りだが、 GitHub-hosted runnerは毎回使い捨てVMなのでジョブをまたいでは残らない。 actions/cache/restore+saveで永続化し、2回目以降のダウンロードをスキップする。 action自体のnode_modules(storycap等)もpackage-lock.jsonハッシュでキャッシュ。 Noto CJKフォントのキャッシュ化は、/usr/share/fonts配下がroot所有で actions/cacheの復元権限まわりの検証が必要なため今回は見送り(将来課題)。
|
🎉 This PR is included in version 1.2.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
「速さで戦う」施策の1つ目。composite action内のCIステップをキャッシュして実行時間を短縮する。
実測(chromagic-demoでの計測、単一実行)
変更内容
actions/cache/restore+actions/cache/saveで以下をキャッシュ${{ runner.tool_cache }}/setup-chrome) — browser-actions/setup-chromeは内部でRUNNER_TOOL_CACHEを使うが、GitHub-hosted runnerは毎回使い捨てVMなのでジョブをまたいでは残らない。actions/cacheで永続化する${{ github.action_path }}/node_modules) — package-lock.jsonのハッシュをキーにNoto CJKフォントのキャッシュ化は
/usr/share/fonts配下がroot所有で actions/cache の復元権限まわりの検証が必要なため今回は見送り(将来課題)。動作確認
actionlintOK (exit 0)🤖 Generated with Claude Code