GitHub ActionsでのPlaywrightインストールを速くしたい
playwright install --with-depsに1分くらいかかる
遅い
actions/cacheを使う
うまくいかなかった気がする
--with-depsの部分をキャッシュできないので結局あまり早くならない
apt-getでインストールされるんだが、apt-getのキャッシュ先にアクセス権限がなかった記憶
ちゃんとやればできるかも
container上でjobを実行する
code: yaml
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.50.1-noble
options: --user 1001
imageの部分にはdocker imageを指定できる
勿論ホスト側とNode.jsのバージョンはズレうるので注意が必要
playwright install --with-depsだと1分強かかるが、docker pullだと30秒かからない
https://github.com/elecdeer/storybook-addon-source-link/actions/runs/17003070412/job/48208230238
https://github.com/elecdeer/storybook-addon-source-link/actions/runs/17020808353/job/48249566750
参考
https://github.com/microsoft/playwright/issues/7249
#2025Aug