Skip to content
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

esbuild-bundle-analyzerが正しくファイルを認識するようにした #739

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yonta
Copy link
Collaborator

@yonta yonta commented Jun 18, 2024

fix #736

やったこと

  • mainへのpushをトリガーに追加
    • これがないから、比較元であるベースブランチの解析結果がからっぽだった。なので常に全部Addedだった!(はず)
  • 一部のリファクタ
    • actionsのバージョンアップ
    • コメントやパーミッション設定を、公式ドキュメント通りにした

@yonta
Copy link
Collaborator Author

yonta commented Jun 18, 2024

PR #725 (CIの修正PR)を受け入れたあとにrebaseする

@yonta yonta force-pushed the pr/issue736/always-added-bundle-anylyze branch from 760e713 to 21afd27 Compare June 18, 2024 09:00
@yonta
Copy link
Collaborator Author

yonta commented Jun 18, 2024

no base analysis foundとな…

image

Error: no matching workflow run found with any artifacts?

@yonta
Copy link
Collaborator Author

yonta commented Jun 18, 2024

他のPRでAddedになってたときのActions見ると、なんかエラーでてるな。

https://github.com/momocus/sakazuki/actions/runs/9561872704
https://github.com/momocus/sakazuki/actions/runs/9561872704/job/26357032994

image

...
▶Run exoego/esbuild-bundle-analyzer@v1
▶Run dawidd6/action-download-artifact@v3
==> Repository: momocus/sakazuki
==> Artifact name: 
==> Local path: .analyzer/base
==> Workflow name: 995021[10](https://github.com/momocus/sakazuki/actions/runs/9561872704/job/26357032994#step:6:11)
==> Workflow conclusion: success
==> Branch: main
==> Allow forks: true
Error: no matching workflow run found with any artifacts?
Run node /home/runner/work/_actions/exoego/esbuild-bundle-analyzer/v1/dist/index.mjs
Wrote /home/runner/work/sakazuki/sakazuki/.analyzer/bundle_analysis.json {
  'meta.json -> app/assets/builds/application.js': {
    bytes: 1007464,
    metafile: 'meta.json',
    outfile: 'app/assets/builds/application.js'
  }
}
▶Run node /home/runner/work/_actions/exoego/esbuild-bundle-analyzer/v1/dist/index.mjs
...

@yonta
Copy link
Collaborator Author

yonta commented Jun 18, 2024

このPRで起動したActionsではエラーでてない。

@yonta yonta force-pushed the pr/issue736/always-added-bundle-anylyze branch from 21afd27 to 37e36db Compare June 30, 2024 08:42
Copy link

github-actions bot commented Jun 30, 2024

📦 esbuild Bundle Analysis for sakazuki

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@yonta yonta force-pushed the pr/issue736/always-added-bundle-anylyze branch from 37e36db to e834345 Compare June 30, 2024 08:53
@yonta
Copy link
Collaborator Author

yonta commented Jun 30, 2024

rebase後もやはりのーあーてぃふぁくとエラーは出てる。
つまり、ベースとなるmainブランチの解析結果がないってことか。

@yonta
Copy link
Collaborator Author

yonta commented Jun 30, 2024

そもそもmainブランチの内容を保存しておかないといけないのでは。
つまりmainへのpushでこのアクションを起動するのを削除してるのが悪い気がしてきた。
mainへのpush時にアクション起動しないと、ベースブランチの解析結果(アーティファクト)が保存されないじゃん。

PR時に比較対象であるmainブランチを解析する必要がある。
そのために、push mainをトリガーに追加した。
@yonta yonta force-pushed the pr/issue736/always-added-bundle-anylyze branch from e834345 to 760591b Compare June 30, 2024 09:10
Copy link

codecov bot commented Jun 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.57%. Comparing base (37fe2c8) to head (760591b).
Report is 32 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #739   +/-   ##
=======================================
  Coverage   96.57%   96.57%           
=======================================
  Files          17       17           
  Lines         321      321           
=======================================
  Hits          310      310           
  Misses         11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yonta yonta self-assigned this Jun 30, 2024
@yonta yonta marked this pull request as ready for review June 30, 2024 09:13
@yonta yonta requested a review from momocus June 30, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esbuild-bundle-analyzerが毎回新しいファイルAddと報告している
1 participant