Skip to content

Commit

Permalink
Fix Attempt #4
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle committed Aug 29, 2023
1 parent 8792739 commit 951c192
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/composite_actions/log_metric/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ runs:
shell: bash

- name: Get Failing Step
if: env.SKIP != 'true' && ${{ job.status == 'failure' }}
if: env.SKIP != 'true' && ${{ inputs.job.status == 'failure' }}
run: |
failing_step=$( \
dart ./tool/get_failing_step.dart \
Expand All @@ -106,7 +106,7 @@ runs:
run: |
dart ./tool/send_metric_data.dart \
--metric-name="github_metric_1.0" \
--job-status="${{ job.status == 'failure' }}" \
--job-status="${{ inputs.job.status == 'failure' }}" \
--test-type="${{ inputs.testType }}" \
--category="${{ inputs.category }}" \
--workflow-name="${{ inputs.workflowName }}" \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/amplify_canaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.channel }}, ${{ matrix.flutter-version}}
job-identifier: build (${{ matrix.channel }}, ${{ matrix.flutter-version}})
testType: canary
category: all
workflowName: amplify_canaries/build
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.channel }}, ${{ matrix.flutter-version}}
job-identifier: e2e-android (${{ matrix.channel }}, ${{ matrix.flutter-version}})
testType: canary
category: all
workflowName: amplify_canaries/e2e-android
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.channel }}, ${{ matrix.flutter-version}}
job-identifier: e2e-ios (${{ matrix.channel }}, ${{ matrix.flutter-version}})
testType: canary
category: all
workflowName: amplify_canaries/e2e-ios
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/amplify_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.scope }}, ${{ matrix.api-level}}, ${{ matrix.target }}
job-identifier: android (${{ matrix.scope }}, ${{ matrix.api-level}}, ${{ matrix.target }})
testType: integration
category: ${{ matrix.scope }}
workflowName: ${{ matrix.scope }}/amplify_integration_tests
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.scope }}
job-identifier: ios (${{ matrix.scope }})
testType: integration
category: ${{ matrix.scope }}
workflowName: ${{ matrix.scope }}/amplify_integration_tests
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.scope }}
job-identifier: web (${{ matrix.scope }})
testType: integration
category: ${{ matrix.scope }}
workflowName: ${{ matrix.scope }}/amplify_integration_tests
Expand Down Expand Up @@ -315,7 +315,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.scope }}
job-identifier: linux (${{ matrix.scope }})
testType: integration
category: ${{ matrix.scope }}
workflowName: ${{ matrix.scope }}/amplify_integration_tests
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
aws-region: ${{ secrets.AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
job-status: ${{ job.status }}
job-identifier: ${{ matrix.scope }}
job-identifier: windows (${{ matrix.scope }})
testType: integration
category: ${{ matrix.scope }}
workflowName: ${{ matrix.scope }}/amplify_integration_tests
Expand Down
4 changes: 2 additions & 2 deletions tool/get_failing_step.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ void main(List<String> args) async {
final failingStep = steps.firstWhere(
(element) => element['conclusion'] == 'failure',
orElse: () => null);

print(failingStep['name']);
} on Exception catch (_) {
// Return empty string if no job found or no failing step found
// Return empty string if no job found or
print("");
exit(0);
}
}

0 comments on commit 951c192

Please sign in to comment.