Skip to content
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

feat: Automate the generation of screenshots for iOS and Android in various languages & screensizes #1208

Closed
wants to merge 67 commits into from

Conversation

teolemon
Copy link
Member

@teolemon teolemon commented Mar 13, 2022

What this currently does

  • Create a matrix:
    • matrix: language: [fr, en]
    • country: [FR, UK]
    • platform: [ios, android]
    • device: [iPhone8Plus]
  • Reuse the build pipeline
  • Install Chrome Driver
  • Start it (BUG)
  • Run the command created by monsieurtanuki
  • upload screenshots as build artefacts (before a more scalable solution)

Open questions

  • Don't we need native emulators rather ?
  • Why Chrome Driver ?
  • Some people say ChromeDriver isn't working either because of wrong parameters, or because it's not run in a different process

Part of

@teolemon teolemon requested a review from a team as a code owner March 13, 2022 21:59
@teolemon teolemon marked this pull request as draft March 13, 2022 21:59
@teolemon teolemon changed the title Start the Screenshots pipeline feat: Start the Screenshots pipeline Mar 13, 2022
@teolemon
Copy link
Member Author

ios: Run cd ./packages/smooth_app && flutter build ios --release --no-codesign
Error on line 3, column 10 of pubspec.yaml: Invalid version number: Could not parse "ots/android+219".
Running "flutter pub get" in smooth_app...

3 │ version: ots/android+219
│ ^^^^^^^^^^^^^^^

---- Log transcript ----
FINE: Pub 2.16.1
MSG : Resolving dependencies...
FINE: Resolving dependencies finished (0.1s).
ERR : Error on line 3, column 10 of pubspec.yaml: Invalid version number: Could not parse "ots/android+219".
| ╷
| 3 │ version: ots/android+219
| │ ^^^^^^^^^^^^^^^
| ╵
FINE: Exception type: PubspecException
FINE: package:pub/src/pubspec_parse.dart 245:7 PubspecBase._wrapFormatException
| package:pub/src/pubspec_parse.dart 87:16

@teolemon
Copy link
Member Author

Android: build 2.2.1...
Downloading dart_style 2.2.2...
Downloading source_gen 1.2.1...
Downloading win32 2.4.1...
Connection closed while receiving data
pub finished with exit code 69
Error: Process completed with exit code 69.

@teolemon teolemon linked an issue Mar 31, 2022 that may be closed by this pull request
1 task
@teolemon teolemon self-assigned this Mar 31, 2022
@teolemon teolemon added this to the V1 milestone Apr 2, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2022

Codecov Report

❗ No coverage uploaded for pull request base (develop@d3b6fde). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop    #1208   +/-   ##
==========================================
  Coverage           ?   10.92%           
==========================================
  Files              ?      276           
  Lines              ?    13528           
  Branches           ?        0           
==========================================
  Hits               ?     1478           
  Misses             ?    12050           
  Partials           ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@teolemon
Copy link
Member Author

PWD gives:
All SDK package licenses accepted.

/Users/runner/work/smooth-app/smooth-app/packages/smooth_app
WARNING | /etc/localtime does not point

@teolemon
Copy link
Member Author

Questions:

  • can we get rid of the rebuilding of the app ?
  • can we change emulator locale on the fly without restarting it ?
    • adb shell am broadcast -a com.android.intent.action.SET_LOCALE --es com.android.intent.extra.LOCALE ES

@M123-dev
Copy link
Member

Questions:

* can we get rid of the rebuilding of the app ?

Sure, we'd have to remove the matrix and loop through the variants in the tests

* can we change emulator locale on the fly without restarting it ?

We can already do it in the dev settings (It seems currently broken to me) but it's definitely possible

@teolemon
Copy link
Member Author

@teolemon teolemon removed this from the V1 milestone Aug 16, 2022
@teolemon
Copy link
Member Author

I/flutter ( 2508): ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
I/flutter ( 2508): The following assertion was thrown while running async test code:
I/flutter ( 2508): The finder "2 widgets with key [<'next'>] (ignoring offstage widgets):
I/flutter ( 2508): [NextButton-[<'next'>](dependencies: [_InheritedProviderScope<LocalDatabase?>,
I/flutter ( 2508): _LocalizationsScope-[GlobalKey#ef7d5], _InheritedProviderScope<UserPreferences?>]),
I/flutter ( 2508): OnboardingBottomBar-[<'next'>](dependencies: [MediaQuery])]" (used in a call to "tap()") ambiguously
I/flutter ( 2508): found multiple matching widgets. The "tap()" method needs a single target.

@monsieurtanuki
Copy link
Contributor

I/flutter ( 2508): ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK

Working on it. Should be OK tomorrow.

@teolemon
Copy link
Member Author

ERR : Error on line 3, column 10 of pubspec.yaml: Invalid version number: Could not parse "ots/android+719".
| ╷
| 3 │ version: ots/android+719
| │ ^^^^^^^^^^^^^^^
| ╵

@monsieurtanuki
Copy link
Contributor

ERR : Error on line 3, column 10 of pubspec.yaml: Invalid version number: Could not parse "ots/android+719".
| ╷
| 3 │ version: ots/android+719
| │ ^^^^^^^^^^^^^^^
| ╵

I guess there's a problem in the generation of the version number. cc @M123-dev
Current pubspec.yaml is:

name: smooth_app
description: The next generation of the Open Food Facts mobile apps.
version: 0.0.0+600

@teolemon
Copy link
Member Author

it's also that the current branch does not follow established pattern, but don't loose too much time on this PR, which isn't prioritary

@teolemon teolemon added the P4 label Aug 20, 2022
@teolemon teolemon closed this Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Add screenshot generation to GitHub Actions pipeline Automatic screenshot generation for Marketing & Tests
4 participants