flutter / flutter/devtools

Clean up integration test sharding

Đang mở
#6,386 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
infra integration tests P3 tech debt
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

Right now, we have an ugly matrix to implement the sharding: https://github.com/flutter/devtools/pull/6385

To improve this we could pull out the integration test into it's own callable workflow that we pass a shard number to:

Calling the 3 devices would then look something like this;
```
  flutter-integration-test:
    name: integration-test ${{ matrix.bot }} - flutter
    needs: flutter-prep
    runs-on: macos-latest

    uses: ./github/workflows/integration-test.yaml
      with:
        shards: 3
        device: flutter
 
  flutter-web-integration-test:
    name: integration-test ${{ matrix.bot }} - flutter-web
    needs: flutter-prep
    runs-on: macos-latest

    uses: ./github/workflows/integration-test.yaml
      with:
        shards: 3
        device: flutter-web
```

All of the steps and environment variables would then be pulled into the ./github/workflows/integration-test.yaml
workflow file using a callable workflow dispatch https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow

Then to handle the sharding weirdness we could use seperate step at the top of that workflow to generate and array that would be fed to the matrix:
See the "From Json to Fully Dynamic Matrix" section here https://tomasvotruba.com/blog/2020/11/16/how-to-make-dynamic-matrix-in-github-actions

the step to generate the array would essentially make it so we could have:matrix:
`shard: ${{}}`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.