fix: Github Actions Workflow Checks and Tests are now working again; dependencies updated #597
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I updated the example app and github actions workflow test.yaml to the latest dependencies so that the tests are now passing.
The one thing I could not figure out how to fix was the dart format test. On my local machine (macOS), dart format changes 0 files (Formatted 8 files; changed 0 files is the output). However, on the github actions, dart format changes 6 files (!). From looking at a git diff, the dart format from github actions seems to be doing something different than on my machine (whether in a terminal in VSCode or in a general terminal) .
The changes are numerous tiny things that are difficult to fix, and they don't have anything to do with the app's functionality (which is what I was most concerned about: Is this app still working despite failing checks, and can we get the tests working again to see?), so I had to call it a day. Maybe someone else can figure out how to fix that test too.
Regardless of whether these changes are accepted or not, I can confirm that all the tests (except dart format) run successfully with the latest changes on the main branch (commit 4ce0651), closing my own issue I opened #593 (comment).
Changes
The example app's pubspec.yaml was relying on the pub.dev version of Flutter Workmanager, which is at 0.5.2. That version of Workmanager does not have the new fields and functions that were added later and hence the Android and ios builds were failing when running the workflow actions.
The example app's android compileSdk and ndkVersion were out of date. I updated the app/build.gradle accordingly. As a result, a bunch of updates were applied to Android also, as can be seen.
The example app's ios had an outdated target (ios 9) for flutter_permission handler. I updated this to 12, which also ended up updating a few files in the ios folder too, since i had to run a pod install.
I had to adjust the version of iPhone targeted to iPhone 15 Pro to match the latest version of mac that the test.yaml was targeting (macos-latest), per the error message I was getting (Error: No devices found for the matching requirements. See https://github.com/futureware-tech/simulator-action/wiki for the list of available devices). This was causing the drive ios test to crash and therefore fail. Accordingly, I also updated the native ios test: updated to iPhone 15 17.4.
I had to adjust the emulator in drive android. To do this, I switched to ubuntu and applied the recommended changes for that. The emulator for android previously was not starting, and so this test would fail. Another upside of switching to ubuntu is that it runs 2-3 times faster, according to the git repo for the android emulator runner.
I had to add a Readme.md file to the workmanager folder. I left it largely blank to be filled in by the devs if they want. The lack of the Readme was causing the format publishable test to fail.