Skip to content

Commit

Permalink
Add ability to run detox tests on Android (#8553)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfaraazkhan authored and Willyfrog committed Feb 19, 2025
1 parent 6a696be commit 5349140
Show file tree
Hide file tree
Showing 46 changed files with 898 additions and 385 deletions.
18 changes: 10 additions & 8 deletions .github/actions/generate-specs/split-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,22 @@ class Specs {
}

generateSplits() {
const chunkSize = Math.ceil(this.rawFiles.length / this.parallelism);
const chunkSize = Math.floor(this.rawFiles.length / this.parallelism);
let remainder = this.rawFiles.length % this.parallelism;
let runNo = 1;
let start = 0;

for (let i = 0; i < this.rawFiles.length; i += chunkSize) {
const end = Math.min(i + chunkSize, this.rawFiles.length);
const fileGroup = this.rawFiles.slice(i, end).join(' ');
for (let i = 0; i < this.parallelism; i++) {
let end = start + chunkSize + (remainder > 0 ? 1 : 0);
const fileGroup = this.rawFiles.slice(start, end).join(' ');
const specFileGroup = new SpecGroup(runNo.toString(), fileGroup, this.deviceInfo);
this.groupedFiles.push(specFileGroup);

if (end === this.rawFiles.length) {
break;
}

start = end;
runNo++;
if (remainder > 0) {
remainder--;
}
}
}

Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/e2e-android-detox.yml

This file was deleted.

Loading

0 comments on commit 5349140

Please sign in to comment.