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

CI (test, build) をいくらか改善する #50

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

ciscorn
Copy link
Member

@ciscorn ciscorn commented Dec 7, 2023

#49

常にTauriを含めて全体のテストをまわすとビルドが肥大化するようなので、ワークフローを以下の3つに分離した:

  • ライブラリ群 (nusamai-*) のテスト → ライブラリ部分を変更するPRに対して実行する。
  • Tauri app (app) のテスト → tauri 部分を変更するPRに対して実行する。
  • Tauri app とそこから参照されるライブラリ、のビルド → 常に実行する。

これでテストの実行はいまよりは高速になる。CIキャッシュも、2GBくらいあったものが → 200MB や 500MB 程度になった。(Actionsのキャッシュはリポジトリあたり上限10GBで、超えると古いものからevictされる)

#49 で挙げている問題をすべて解消できているわけではない。テストが重いコンポーネントは、さらにテストワークフローを分離するか、汎用性高く実装できている箇所を別のリポジトリに切り出すのがいいと思う。

@ciscorn ciscorn changed the title ci: split build and test CI (test/build) のいくらかの改善 Dec 7, 2023
@ciscorn ciscorn changed the title CI (test/build) のいくらかの改善 CI (test, build) のいくらかの改善 Dec 7, 2023
@ciscorn ciscorn force-pushed the feature/improve-test branch 3 times, most recently from f475577 to d70dd55 Compare December 7, 2023 09:38
@ciscorn ciscorn force-pushed the feature/improve-test branch from d70dd55 to efed683 Compare December 7, 2023 09:39
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Additional details and impacted files
Components Coverage Δ
tauri-app ∅ <ø> (∅)
nusamai-* 79.04% <ø> (ø)

📢 Thoughts on this report? Let us know!

@ciscorn ciscorn self-assigned this Dec 7, 2023
@ciscorn ciscorn marked this pull request as ready for review December 7, 2023 15:30
@ciscorn ciscorn requested a review from a team December 7, 2023 15:31
@ciscorn ciscorn changed the title CI (test, build) のいくらかの改善 CI (test, build) をいくらか改善する Dec 7, 2023
@ciscorn ciscorn force-pushed the feature/improve-test branch from 270fb5a to 8dc0488 Compare December 7, 2023 23:52
Copy link
Member

@sorami sorami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! いいですね

.github/workflows/test_libs.yml Show resolved Hide resolved
@ciscorn ciscorn merged commit 7bf364e into main Dec 8, 2023
4 checks passed
@ciscorn ciscorn deleted the feature/improve-test branch December 8, 2023 05:45
ciscorn added a commit that referenced this pull request Dec 27, 2023
#49

常にTauriを含めて全体のテストをまわすとビルドが肥大化するようなので、ワークフローを以下の3つに分離した:

- ライブラリ群 (`nusamai-*`) のテスト → ライブラリ部分を変更するPRに対して実行する。
- Tauri app (`app`) のテスト  → tauri 部分を変更するPRに対して実行する。
- Tauri app とそこから参照されるライブラリ、のビルド → 常に実行する。

これでテストの実行はいまよりは高速になる。CIキャッシュも、2GBくらいあったものが → 200MB や 500MB
程度になった。(Actionsのキャッシュはリポジトリあたり上限10GBで、超えると古いものからevictされる)

#49
で挙げている問題をすべて解消できているわけではない。テストが重いコンポーネントは、さらにテストワークフローを分離するか、汎用性高く実装できている箇所を別のリポジトリに切り出すのがいいと思う。
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.

2 participants