Flutter Test Step Fails (junit report issue)

We have recently moved our build stack to M1 machines and that has resulted in getting the following error upon “flutter test” step being run:

Could not find a file named “pubspec.yaml” in "/Users/vagrant/.pub-cache/hosted/pub.dev/junitreport-2.0.2

This can be solved by adding the package to our codebase, which is not something we want to do considering it’s 18 months old and causes issues with its outdated dependencies when building against the more recent versions of Flutter.

Any suggestions on how to solve this (or how to disable the reporting functionality as a whole without removing the test step) would be much appreciated.

1 Like

We’re having the same issue and can’t add it due to dependency conflicts.

For now I’ve worked around the issue by adding a script task before Flutter Test in the workflow

# activate junitreport so the Flutter Test task works
dart pub global activate junitreport