-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP CI/Unitテスト時にcacheが効いてなさそう #41
Comments
issueありがとうございます! |
正直このissuesの対応価値は低いと思ってます ただせっかくの機会なので@ysknsid25 さん自身がDevOps周りの実装をする方がいいと思いました 後お節介かもしれませんがphpstanでworkflowにlinterを入れていると品質担保に役に立つかなと思いました |
いえいえとんでもないです。 おっしゃるとおり、せっかくの機会なので自分で実装させてもらいます🙏 |
Signed-off-by: ysknsid25 <kengo071225@gmail.com>
Signed-off-by: ysknsid25 <kengo071225@gmail.com>
お疲れ様です。 |
#41 PHP CI/Unitテスト時にcacheが効いてなさそう
気になった箇所
GitHub Actions上でCIをされているPHPのunit testを実行時に
毎回composer installを実行していそうでした
キャッシュを入れられているので違和感を感じました
https://github.com/ysknsid25/otaku-tool/blob/master/.github/workflows/PHP-UnitTest.yml#L35
原因
デバックをしているわけではないので予想ですが
こちらのpathが間違っていることが原因ではないかと思いました
./vendor
->./framework/vendor
https://github.com/ysknsid25/otaku-tool/blob/master/.github/workflows/PHP-UnitTest.yml#L37
workflow post cache vendorの箇所のログ
/usr/bin/tar: /home/runner/work/otaku-tool/otaku-tool/vendor: Cannot open: No such file or directory
補足
あとキャッシュヒットしたときにautoloadが走らないのでappにクラスを追加した場合にエラーになるかもしれないので
composer dump-autoload
をいれたほうがいいかもです
参考記事
FYI
ライブラリのバージョンが古いので警告が出ておりました
actions/checkout@v2 -> actions/checkout@v3
actions/cache@v1 -> actions/cache@v3
スクリーンショット
The text was updated successfully, but these errors were encountered: