File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 11name : Emit Metrics
2- description : Emit metrics from another workflow/action using the kat tool
2+ description : Emit metrics using the kat tool
33inputs :
44 namespace :
55 description : The CloudWatch namespace in which to emit metrics
@@ -40,6 +40,9 @@ inputs:
4040runs :
4141 using : composite
4242 steps :
43+ - name : Verify kat exists
44+ shell : bash
45+ run : which kat || ( echo Cannot find kat installation. Did you forget to run setup-kat first? && exit 1 )
4346 - name : Emit Metrics
4447 shell : bash
4548 run : |
Original file line number Diff line number Diff line change 3232 metrics : |
3333 BuildTime:4.532:Seconds
3434 BuildSucceeded:1:Count
35+
36+ fail-when-kat-unavailable :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - name : Checkout sources
40+ uses : actions/checkout@v4
41+ - name : Fail to emit some test metrics
42+ uses : ./.github/actions/emit-metrics
43+ continue-on-error : true
44+ with :
45+ namespace : Test Namespace (ignore me)
46+ dimensions : |
47+ Artifact=foo-artifact
48+ Platform=Kotlin/JVM
49+ Variant=External
50+ metrics : |
51+ BuildTime:4.532:Seconds
52+ BuildSucceeded:1:Count
53+ - name : Handle expected failure
54+ if : ${{ failure() }}
55+ shell : bash
56+ run : |
57+ echo Saw expected failure from attempting to emit metrics when kat isn't installed.
58+ echo All good now!
59+ exit 0
You can’t perform that action at this time.
0 commit comments