diff --git a/.github/workflows/amplify_authenticator.yaml b/.github/workflows/amplify_authenticator.yaml index de475e10f90..c5ff27d7294 100644 --- a/.github/workflows/amplify_authenticator.yaml +++ b/.github/workflows/amplify_authenticator.yaml @@ -7,48 +7,48 @@ on: - stable pull_request: paths: - - '.github/workflows/amplify_authenticator.yaml' - - '.github/workflows/flutter_vm.yaml' - - 'packages/amplify/amplify_flutter/lib/**/*.dart' - - 'packages/amplify/amplify_flutter/pubspec.yaml' - - 'packages/amplify_core/lib/**/*.dart' - - 'packages/amplify_core/pubspec.yaml' - - 'packages/amplify_lints/lib/**/*.yaml' - - 'packages/amplify_lints/pubspec.yaml' - - 'packages/analytics/amplify_analytics_pinpoint/lib/**/*.dart' - - 'packages/analytics/amplify_analytics_pinpoint/pubspec.yaml' - - 'packages/analytics/amplify_analytics_pinpoint_dart/lib/**/*.dart' - - 'packages/analytics/amplify_analytics_pinpoint_dart/pubspec.yaml' - - 'packages/auth/amplify_auth_cognito/lib/**/*.dart' - - 'packages/auth/amplify_auth_cognito/pubspec.yaml' - - 'packages/auth/amplify_auth_cognito_dart/lib/**/*.dart' - - 'packages/auth/amplify_auth_cognito_dart/pubspec.yaml' - - 'packages/authenticator/amplify_authenticator/**/*.dart' - - 'packages/authenticator/amplify_authenticator/**/*.yaml' - - 'packages/authenticator/amplify_authenticator/lib/**/*' - - 'packages/authenticator/amplify_authenticator/test/**/*' - - 'packages/aws_common/lib/**/*.dart' - - 'packages/aws_common/pubspec.yaml' - - 'packages/aws_signature_v4/lib/**/*.dart' - - 'packages/aws_signature_v4/pubspec.yaml' - - 'packages/common/amplify_db_common/lib/**/*.dart' - - 'packages/common/amplify_db_common/pubspec.yaml' - - 'packages/common/amplify_db_common_dart/lib/**/*.dart' - - 'packages/common/amplify_db_common_dart/pubspec.yaml' - - 'packages/secure_storage/amplify_secure_storage/lib/**/*.dart' - - 'packages/secure_storage/amplify_secure_storage/pubspec.yaml' - - 'packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart' - - 'packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml' - - 'packages/smithy/smithy/lib/**/*.dart' - - 'packages/smithy/smithy/pubspec.yaml' - - 'packages/smithy/smithy_aws/lib/**/*.dart' - - 'packages/smithy/smithy_aws/pubspec.yaml' - - 'packages/smithy/smithy_codegen/lib/**/*.dart' - - 'packages/smithy/smithy_codegen/pubspec.yaml' - - 'packages/worker_bee/worker_bee/lib/**/*.dart' - - 'packages/worker_bee/worker_bee/pubspec.yaml' - - 'packages/worker_bee/worker_bee_builder/lib/**/*.dart' - - 'packages/worker_bee/worker_bee_builder/pubspec.yaml' + - ".github/workflows/amplify_authenticator.yaml" + - ".github/workflows/flutter_vm.yaml" + - "packages/amplify/amplify_flutter/lib/**/*.dart" + - "packages/amplify/amplify_flutter/pubspec.yaml" + - "packages/amplify_core/lib/**/*.dart" + - "packages/amplify_core/pubspec.yaml" + - "packages/amplify_lints/lib/**/*.yaml" + - "packages/amplify_lints/pubspec.yaml" + - "packages/analytics/amplify_analytics_pinpoint/lib/**/*.dart" + - "packages/analytics/amplify_analytics_pinpoint/pubspec.yaml" + - "packages/analytics/amplify_analytics_pinpoint_dart/lib/**/*.dart" + - "packages/analytics/amplify_analytics_pinpoint_dart/pubspec.yaml" + - "packages/auth/amplify_auth_cognito/lib/**/*.dart" + - "packages/auth/amplify_auth_cognito/pubspec.yaml" + - "packages/auth/amplify_auth_cognito_dart/lib/**/*.dart" + - "packages/auth/amplify_auth_cognito_dart/pubspec.yaml" + - "packages/authenticator/amplify_authenticator/**/*.dart" + - "packages/authenticator/amplify_authenticator/**/*.yaml" + - "packages/authenticator/amplify_authenticator/lib/**/*" + - "packages/authenticator/amplify_authenticator/test/**/*" + - "packages/aws_common/lib/**/*.dart" + - "packages/aws_common/pubspec.yaml" + - "packages/aws_signature_v4/lib/**/*.dart" + - "packages/aws_signature_v4/pubspec.yaml" + - "packages/common/amplify_db_common/lib/**/*.dart" + - "packages/common/amplify_db_common/pubspec.yaml" + - "packages/common/amplify_db_common_dart/lib/**/*.dart" + - "packages/common/amplify_db_common_dart/pubspec.yaml" + - "packages/secure_storage/amplify_secure_storage/lib/**/*.dart" + - "packages/secure_storage/amplify_secure_storage/pubspec.yaml" + - "packages/secure_storage/amplify_secure_storage_dart/lib/**/*.dart" + - "packages/secure_storage/amplify_secure_storage_dart/pubspec.yaml" + - "packages/smithy/smithy/lib/**/*.dart" + - "packages/smithy/smithy/pubspec.yaml" + - "packages/smithy/smithy_aws/lib/**/*.dart" + - "packages/smithy/smithy_aws/pubspec.yaml" + - "packages/smithy/smithy_codegen/lib/**/*.dart" + - "packages/smithy/smithy_codegen/pubspec.yaml" + - "packages/worker_bee/worker_bee/lib/**/*.dart" + - "packages/worker_bee/worker_bee/pubspec.yaml" + - "packages/worker_bee/worker_bee_builder/lib/**/*.dart" + - "packages/worker_bee/worker_bee_builder/pubspec.yaml" schedule: - cron: "0 0 * * 0" # Every Sunday at 00:00 defaults: @@ -69,3 +69,4 @@ jobs: with: package-name: amplify_authenticator working-directory: packages/authenticator/amplify_authenticator + runner-os: macos-latest diff --git a/.github/workflows/flutter_vm.yaml b/.github/workflows/flutter_vm.yaml index 6ceb34d0239..267f5a70132 100644 --- a/.github/workflows/flutter_vm.yaml +++ b/.github/workflows/flutter_vm.yaml @@ -10,11 +10,16 @@ on: description: The working directory relative to the repo root required: true type: string + runner-os: + description: The OS the tests should run on + required: false + type: string + default: ubuntu-latest jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ${{ inputs.runner-os }} timeout-minutes: 60 strategy: # Allows other matrix items to run if one fails @@ -82,6 +87,25 @@ 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: Check for golden failures directory + if: "always() && steps.testJob.conclusion == 'failure'" + id: checkGoldenFailures + working-directory: ${{ inputs.working-directory }} + run: | + if [ -d test/ui/failures ]; then + echo "hasFailures=true" >> $GITHUB_OUTPUT + else + echo "hasFailures=false" >> $GITHUB_OUTPUT + fi + + - name: Archive golden failures + if: "always() && steps.checkGoldenFailures.outputs.hasFailures == 'true'" + uses: actions/upload-artifact@v3 + with: + name: golden-failures-${{ matrix.channel }}-${{ matrix.flutter-version }} + path: ${{ inputs.working-directory }}/test/ui/failures/ diff --git a/packages/authenticator/amplify_authenticator/pubspec.yaml b/packages/authenticator/amplify_authenticator/pubspec.yaml index 4dc7b624b78..6f910fee366 100644 --- a/packages/authenticator/amplify_authenticator/pubspec.yaml +++ b/packages/authenticator/amplify_authenticator/pubspec.yaml @@ -51,3 +51,7 @@ flutter: - family: SocialIcons fonts: - asset: assets/social-buttons/SocialIcons.ttf + +aft: + github: + custom: true