Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Speed up CI tests

Manav Rathidfcfe8b1f2c6
diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml
index ae76a477bd..88d7276b0a 100644
--- a/.github/workflows/mobile-lint.yml
+++ b/.github/workflows/mobile-lint.yml
@@ -92,15 +92,18 @@ jobs:
- name: Lint and test
working-directory: mobile
run: |
- members=$(dart pub workspace list --json | jq -r '.packages[] | select(.name != "ente_workspace") | .path')
- for member in $members; do
- echo "Checking ${member#"$PWD/"}"
- (
- cd "$member"
- dart format --output=none --set-exit-if-changed .
- flutter analyze
- if [[ -d test ]]; then
- flutter test
- fi
- )
- done
+ check_package() (
+ member=${1#"$PWD/"}
+ echo "Checking $member"
+ cd "$member"
+ dart format --output=none --set-exit-if-changed .
+ flutter analyze
+ if [[ -d test ]]; then
+ flutter test
+ fi
+ )
+ export -f check_package
+
+ dart pub workspace list --json |
+ jq -r '.packages[] | select(.name != "ente_workspace") | .path' |
+ xargs -P4 -n1 bash -e -c 'check_package "$1"' _
diff --git a/.github/workflows/rust-e2e-test.yml b/.github/workflows/rust-e2e-test.yml
index 17f0ec3d06..4d23f55976 100644
--- a/.github/workflows/rust-e2e-test.yml
+++ b/.github/workflows/rust-e2e-test.yml
@@ -19,8 +19,17 @@ env:
jobs:
integration:
+ name: ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 30
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: CLI integration tests
+ package: ente-rs
+ - name: E2E suite
+ package: ente-e2e
defaults:
run:
working-directory: rust
@@ -42,12 +51,9 @@ jobs:
shared-key: rust-cli
save-if: false
- - name: Run CLI integration tests
- run: cargo test -p ente-rs --features museum --locked
+ - name: Run ${{ matrix.name }}
+ run: cargo test -p ${{ matrix.package }} --features museum --locked
# GITHUB_TOKEN lifts GitHub API rate limit when fetching
# postgresql_embedded binaries.
env:
GITHUB_TOKEN: ${{ github.token }}
-
- - name: Run E2E suite
- run: cargo test -p ente-e2e --features museum --locked
diff --git a/.github/workflows/rust-lint.yml b/.github/workflows/rust-lint.yml
index c1cc24cdc3..f80d4cfcca 100644
--- a/.github/workflows/rust-lint.yml
+++ b/.github/workflows/rust-lint.yml
@@ -44,7 +44,11 @@ jobs:
- run: cargo clippy --all-targets --locked
- - run: cargo test --locked --workspace --features ente-photos/ml-assets
+ - run: cargo install cargo-nextest --version 0.9.140 --locked
+
+ - run: cargo nextest run --locked --workspace --features ente-photos/ml-assets
+
+ - run: cargo test --locked --workspace --features ente-photos/ml-assets --doc
- run: cargo install cargo-audit --version 0.22.2 --locked
diff --git a/.github/workflows/warm-caches.yml b/.github/workflows/warm-caches.yml
index 8eed44358e..93ef58f0ce 100644
--- a/.github/workflows/warm-caches.yml
+++ b/.github/workflows/warm-caches.yml
@@ -48,7 +48,9 @@ jobs:
- run: cargo clippy --all-targets --locked
- - run: cargo test --locked --workspace --features ente-photos/ml-assets
+ - run: cargo install cargo-nextest --version 0.9.140 --locked
+
+ - run: cargo test --locked --workspace --features ente-photos/ml-assets --no-run
- run: cargo install cargo-audit --version 0.22.2 --locked