Skip to content

armgit / ente

Public Imported from GitHub
0

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

Refine parallel CI tests

Manav Rathieeb6151ae1cd
diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml
index 88d7276b0a..9ba9bb6aee 100644
--- a/.github/workflows/mobile-lint.yml
+++ b/.github/workflows/mobile-lint.yml
@@ -89,21 +89,28 @@ jobs:
- run: flutter pub get --enforce-lockfile
working-directory: mobile
- - name: Lint and test
+ - run: dart format --output=none --set-exit-if-changed .
+ working-directory: mobile
+
+ - run: flutter analyze --no-pub
+ working-directory: mobile
+
+ - name: Test
working-directory: mobile
run: |
- check_package() (
+ test_package() (
member=${1#"$PWD/"}
- echo "Checking $member"
+ echo "Testing $member"
cd "$member"
- dart format --output=none --set-exit-if-changed .
- flutter analyze
- if [[ -d test ]]; then
- flutter test
- fi
+ flutter test --no-pub
)
- export -f check_package
+ export -f test_package
dart pub workspace list --json |
jq -r '.packages[] | select(.name != "ente_workspace") | .path' |
- xargs -P4 -n1 bash -e -c 'check_package "$1"' _
+ while IFS= read -r member; do
+ if [[ -d "$member/test" ]]; then
+ printf '%s\n' "$member"
+ fi
+ done |
+ xargs -P4 -n1 bash -e -c 'test_package "$1"' _
diff --git a/.github/workflows/warm-caches.yml b/.github/workflows/warm-caches.yml
index 93ef58f0ce..ba76c2dffe 100644
--- a/.github/workflows/warm-caches.yml
+++ b/.github/workflows/warm-caches.yml
@@ -50,7 +50,7 @@ jobs:
- run: cargo install cargo-nextest --version 0.9.140 --locked
- - run: cargo test --locked --workspace --features ente-photos/ml-assets --no-run
+ - run: cargo nextest run --locked --workspace --features ente-photos/ml-assets
- run: cargo install cargo-audit --version 0.22.2 --locked