Skip to content

Commit

Permalink
fix: limit CI to MacOS && save golden failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Equartey committed Aug 31, 2023
1 parent 47b80ee commit aca744a
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 43 deletions.
85 changes: 43 additions & 42 deletions .github/workflows/amplify_authenticator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -69,3 +69,4 @@ jobs:
with:
package-name: amplify_authenticator
working-directory: packages/authenticator/amplify_authenticator
runner-os: macos-latest
26 changes: 25 additions & 1 deletion .github/workflows/flutter_vm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
4 changes: 4 additions & 0 deletions packages/authenticator/amplify_authenticator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ flutter:
- family: SocialIcons
fonts:
- asset: assets/social-buttons/SocialIcons.ttf

aft:
github:
custom: true

0 comments on commit aca744a

Please sign in to comment.