-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#49 常にTauriを含めて全体のテストをまわすとビルドが肥大化するようなので、ワークフローを以下の3つに分離した: - ライブラリ群 (`nusamai-*`) のテスト → ライブラリ部分を変更するPRに対して実行する。 - Tauri app (`app`) のテスト → tauri 部分を変更するPRに対して実行する。 - Tauri app とそこから参照されるライブラリ、のビルド → 常に実行する。 これでテストの実行はいまよりは高速になる。CIキャッシュも、2GBくらいあったものが → 200MB や 500MB 程度になった。(Actionsのキャッシュはリポジトリあたり上限10GBで、超えると古いものからevictされる) #49 で挙げている問題をすべて解消できているわけではない。テストが重いコンポーネントは、さらにテストワークフローを分離するか、汎用性高く実装できている箇所を別のリポジトリに切り出すのがいいと思う。
- Loading branch information
Showing
7 changed files
with
91 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build Tauri App | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Rustup | ||
run: rustup toolchain install stable --profile minimal | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: install dependencies | ||
# if: matrix.platform == 'ubuntu-20.04' | ||
run: | | ||
sudo apt-get update | ||
sudo apt install -y libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | ||
- name: Make Tauri build destination | ||
run: mkdir -p app/build | ||
- name: Build | ||
run: cargo build --verbose --package app |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Test Libraries | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
pull_request: | ||
paths: | ||
- "nusamai/**" | ||
- "nusamai-*/**" | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Rustup | ||
run: rustup toolchain install stable --profile minimal | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt install -y libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Test | ||
run: cargo llvm-cov --workspace --exclude app --lcov --output-path lcov.info --all-features | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
files: lcov.info | ||
fail_ci_if_error: false |
This file contains 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
This file contains 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
This file contains 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