-
Notifications
You must be signed in to change notification settings - Fork 53
Setup up flutter tests, minimal starter tests #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jasikpark
wants to merge
37
commits into
main
Choose a base branch
from
pr-323-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
f8f3da0
Add comprehensive test suite for PR #323
jasikpark 2f9a183
Add GitHub Actions CI workflow for automated testing
jasikpark ee951c9
Remove unused imports
jasikpark 7f5a2c0
Update .gitignore for test coverage artifacts
jasikpark 832d093
Don't track ios/Flutter/ephemeral
jasikpark cacca71
Update pubspec.lock
jasikpark 93e349f
Address CodeRabbit feedback on test files
jasikpark d565511
Move test documentation to main README
jasikpark 818df32
Refactor settings screen tests to focus on UI behavior
jasikpark f70b1d9
Adjust assertions for clarity
jasikpark f6f22d0
Add golden tests for home and site detail screens
jasikpark 94f5e9d
Fix lints in test files
jasikpark c574a46
Don't fail flutter analyze on info or warning lints
jasikpark aa80215
Disable flutter analyze in CI
jasikpark 98d268e
Use build pipeline from smoke.yml
jasikpark 14d7214
moar fix
jasikpark 0a35fd7
Match naming and casing from other flutter jobs
jasikpark baa1894
Rename flutter test workflow file
jasikpark 17da612
Generate artifacts for ios
jasikpark b3d6615
Run on macos 26
jasikpark 8c1a4d8
Mention that this is the iOS flutter test
jasikpark 8504054
Remove useless test
jasikpark 0b4ab84
Re-add failing golden tests w/ explicit screen size config for iphone…
jasikpark 7d78a36
Fix golden test pixel shifts by setting devicePixelRatio to 1.0
jasikpark 46c49e8
Try setting screen size per-test to see if that fixes CI v.s. local i…
jasikpark 1495ef5
Remove golden tests to make first testing PR easy to review and merge
jasikpark 7355ee7
Revert changes to SiteDetailScreen.dart
jasikpark 742c33f
Oops updated SiteDetailScreen.dart when it was renamed
jasikpark 4aecd09
format
jasikpark e8009ce
Simplify flutter analyze recc command
jasikpark 1c42070
Update fluttertest.yml
jasikpark 89da846
Fix imports
jasikpark 764e3da
Fix imports
jasikpark 0ff8b0e
Fix tests for the rich text widget change
jasikpark 8605c1d
Fix flutter test job title
jasikpark 7b8fc33
Fix artifact unique names
jasikpark e69e0a3
Add gradle cache
jasikpark File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: Flutter test | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/fluttercheck.yml" | ||
| - "**.dart" | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run flutter test | ||
| runs-on: macos-26 | ||
| strategy: | ||
| matrix: | ||
| os: [android, ios] | ||
|
|
||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #6.0.2 | ||
| with: | ||
| show-progress: false | ||
|
|
||
| # TODO: remove when https://go-review.googlesource.com/c/go/+/692935 lands in mainline go | ||
| - name: Patch Go | ||
| uses: DefinedNet/patch-go@c8e4a17c75eb242d34c212419d7d3d25e8d58949 | ||
| with: | ||
| patch-ref: "296be05a97eb526dc0e438b7387670d4cae4a935" | ||
|
|
||
| - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 #v5.2.0 | ||
| with: | ||
| distribution: "zulu" | ||
| java-version: "17" | ||
| cache: "gradle" | ||
|
|
||
| - name: Install flutter | ||
| uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e #v2.21.0 | ||
| with: | ||
| flutter-version: "3.38.9" | ||
| cache: true | ||
|
|
||
| - name: install dependencies | ||
| env: | ||
| TOKEN: ${{ secrets.MACHINE_USER_PAT }} | ||
| run: | | ||
| go install golang.org/x/mobile/cmd/gomobile@latest | ||
| gomobile init | ||
| flutter pub get | ||
| touch env.sh | ||
|
|
||
| - name: generate artifacts | ||
| run: ./gen-artifacts.sh ${{ matrix.os }} | ||
|
|
||
| - name: Run tests | ||
| run: flutter test --coverage | ||
|
|
||
| - name: Upload coverage artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: coverage-report-${{ matrix.os }} | ||
| path: coverage/lcov.info | ||
| if: always() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should remove this since we aren't doing goldens yet