Skip to content

Commit

Permalink
chore(authenticator_test): Updated Golden tests to run on any screen (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Equartey authored Sep 8, 2023
1 parent 89eaa2a commit 9bcac40
Show file tree
Hide file tree
Showing 451 changed files with 4,977 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/amplify_analytics_pinpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ jobs:
with:
package-name: amplify_analytics_pinpoint
working-directory: packages/analytics/amplify_analytics_pinpoint
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_analytics_pinpoint_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
with:
package-name: amplify_analytics_pinpoint_dart
working-directory: packages/analytics/amplify_analytics_pinpoint_dart
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_analytics_pinpoint_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
with:
package-name: amplify_analytics_pinpoint_example
working-directory: packages/analytics/amplify_analytics_pinpoint/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ jobs:
with:
package-name: amplify_api
working-directory: packages/api/amplify_api
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_api_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
with:
package-name: amplify_api_dart
working-directory: packages/api/amplify_api_dart
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_api_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
with:
package-name: amplify_api_example
working-directory: packages/api/amplify_api/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_auth_cognito.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ jobs:
with:
package-name: amplify_auth_cognito
working-directory: packages/auth/amplify_auth_cognito
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_auth_cognito_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
with:
package-name: amplify_auth_cognito_dart
working-directory: packages/auth/amplify_auth_cognito_dart
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_auth_cognito_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
with:
package-name: amplify_auth_cognito_example
working-directory: packages/auth/amplify_auth_cognito/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_auth_cognito_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
with:
package-name: amplify_auth_cognito_test
working-directory: packages/auth/amplify_auth_cognito_test
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_authenticator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ jobs:
with:
package-name: amplify_authenticator
working-directory: packages/authenticator/amplify_authenticator
has-goldens: true
1 change: 1 addition & 0 deletions .github/workflows/amplify_authenticator_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
with:
package-name: amplify_authenticator_example
working-directory: packages/authenticator/amplify_authenticator/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
with:
package-name: amplify_core
working-directory: packages/amplify_core
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_datastore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:
with:
package-name: amplify_datastore
working-directory: packages/amplify_datastore
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_datastore_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
with:
package-name: amplify_datastore_example
working-directory: packages/amplify_datastore/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_datastore_plugin_interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ jobs:
with:
package-name: amplify_datastore_plugin_interface
working-directory: packages/amplify_datastore_plugin_interface
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_db_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:
with:
package-name: amplify_db_common
working-directory: packages/common/amplify_db_common
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_db_common_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
with:
package-name: amplify_db_common_dart
working-directory: packages/common/amplify_db_common_dart
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_db_common_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
with:
package-name: amplify_db_common_example
working-directory: packages/common/amplify_db_common/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_flutter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ jobs:
with:
package-name: amplify_flutter
working-directory: packages/amplify/amplify_flutter
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_flutter_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ jobs:
with:
package-name: amplify_flutter_example
working-directory: packages/amplify/amplify_flutter/example
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_lints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ jobs:
with:
package-name: amplify_lints
working-directory: packages/amplify_lints
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_native_legacy_wrapper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
with:
package-name: amplify_native_legacy_wrapper
working-directory: packages/amplify_native_legacy_wrapper
has-goldens: false
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jobs:
with:
package-name: amplify_native_legacy_wrapper_example
working-directory: packages/amplify_native_legacy_wrapper/example
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_push_notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ jobs:
with:
package-name: amplify_push_notifications
working-directory: packages/notifications/push/amplify_push_notifications
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_push_notifications_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ jobs:
with:
package-name: amplify_push_notifications_example
working-directory: packages/notifications/push/amplify_push_notifications/example
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_push_notifications_pinpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ jobs:
with:
package-name: amplify_push_notifications_pinpoint
working-directory: packages/notifications/push/amplify_push_notifications_pinpoint
has-goldens: false
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ jobs:
with:
package-name: amplify_push_notifications_pinpoint_example
working-directory: packages/notifications/push/amplify_push_notifications_pinpoint/example
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_secure_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ jobs:
with:
package-name: amplify_secure_storage
working-directory: packages/secure_storage/amplify_secure_storage
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_secure_storage_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ jobs:
with:
package-name: amplify_secure_storage_dart
working-directory: packages/secure_storage/amplify_secure_storage_dart
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_secure_storage_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
with:
package-name: amplify_secure_storage_example
working-directory: packages/secure_storage/amplify_secure_storage/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_secure_storage_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: amplify_secure_storage_test
working-directory: packages/secure_storage/amplify_secure_storage_test
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_storage_s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ jobs:
with:
package-name: amplify_storage_s3
working-directory: packages/storage/amplify_storage_s3
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/amplify_storage_s3_dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
with:
package-name: amplify_storage_s3_dart
working-directory: packages/storage/amplify_storage_s3_dart
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/amplify_storage_s3_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
with:
package-name: amplify_storage_s3_example
working-directory: packages/storage/amplify_storage_s3/example
has-goldens: false
e2e_android_test:
needs: [test]
uses: ./.github/workflows/e2e_android.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
with:
package-name: aws_common
working-directory: packages/aws_common
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_json1_0_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: aws_json1_0_v1
working-directory: packages/smithy/goldens/lib/awsJson1_0
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_json1_0_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: aws_json1_0_v2
working-directory: packages/smithy/goldens/lib2/awsJson1_0
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_json1_1_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: aws_json1_1_v1
working-directory: packages/smithy/goldens/lib/awsJson1_1
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_json1_1_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: aws_json1_1_v2
working-directory: packages/smithy/goldens/lib2/awsJson1_1
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_query_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: aws_query_v1
working-directory: packages/smithy/goldens/lib/awsQuery
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_query_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: aws_query_v2
working-directory: packages/smithy/goldens/lib2/awsQuery
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/aws_signature_v4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
with:
package-name: aws_signature_v4
working-directory: packages/aws_signature_v4
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cognito_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ jobs:
with:
package-name: cognito_example
working-directory: packages/auth/amplify_auth_cognito_dart/example
has-goldens: false
1 change: 1 addition & 0 deletions .github/workflows/custom_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: custom_v2
working-directory: packages/smithy/goldens/lib2/custom
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ec2_query_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: ec2_query_v1
working-directory: packages/smithy/goldens/lib/ec2Query
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ec2_query_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: ec2_query_v2
working-directory: packages/smithy/goldens/lib2/ec2Query
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/flutter_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ on:
description: The working directory relative to the repo root
required: true
type: string
has-goldens:
description: The package contains golden tests, save build artifacts on failure
required: false
type: boolean

jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: ${{ inputs.has-goldens && 'macos-latest' || 'ubuntu-latest' }}
timeout-minutes: 60
strategy:
# Allows other matrix items to run if one fails
Expand Down Expand Up @@ -82,6 +86,14 @@ jobs:
working-directory: ${{ inputs.working-directory }}

- name: Run Tests
id: testJob
if: "always() && steps.bootstrap.conclusion == 'success' && steps.testCheck.outputs.hasTests == 'true'"
run: flutter test
working-directory: ${{ inputs.working-directory }}

- name: Archive golden failures
if: "always() && inputs.has-goldens && steps.testJob.conclusion == 'failure'"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # 3.1.3
with:
name: golden-failures-${{ matrix.channel }}-${{ matrix.flutter-version }}
path: ${{ inputs.working-directory }}/test/ui/failures/
1 change: 1 addition & 0 deletions .github/workflows/pub_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
with:
package-name: pub_server
working-directory: packages/test/pub_server
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rest_json1_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: rest_json1_v1
working-directory: packages/smithy/goldens/lib/restJson1
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rest_json1_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: rest_json1_v2
working-directory: packages/smithy/goldens/lib2/restJson1
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rest_xml_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: rest_xml_v1
working-directory: packages/smithy/goldens/lib/restXml
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rest_xml_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: rest_xml_v2
working-directory: packages/smithy/goldens/lib2/restXml
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rest_xml_with_namespace_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
with:
package-name: rest_xml_with_namespace_v1
working-directory: packages/smithy/goldens/lib/restXmlWithNamespace
has-goldens: false
native_test:
needs: test
uses: ./.github/workflows/dart_native.yaml
Expand Down
Loading

0 comments on commit 9bcac40

Please sign in to comment.