File tree 1 file changed +20
-3
lines changed
.github/actions/upload-datadog
1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Upload tests to datadog
1
+ name : Upload tests to Datadog
2
2
if : always()
3
3
inputs :
4
4
api-key :
7
7
runs :
8
8
using : " composite"
9
9
steps :
10
+ - name : Set work dir
11
+ run : |
12
+ WORK_DIR=${{ runner.temp }}/datadog-ci
13
+ mkdir -p $WORK_DIR
14
+ echo "WORK_DIR=$WORK_DIR" >> $GITHUB_ENV
15
+ # The npm install was taking 30s to 1m, accounting for 20+% of the total
16
+ # job time.
17
+ - name : Cache datadog-ci
18
+ uses : buildjet/cache@v3
19
+ with :
20
+ path : |
21
+ ${{ env.WORK_DIR }}
22
+ key : datadog-ci-${{ runner.os }}
23
+ restore-keys : |
24
+ datadog-ci-${{ runner.os }}-
25
+ datadog-ci-
10
26
- shell : bash
11
27
run : |
28
+ cd ${{ env.WORK_DIR }}
12
29
owner=${{ github.repository_owner }}
13
30
echo "owner: $owner"
14
31
if [[ $owner != "coder" ]]; then
20
37
echo "No API key provided, skipping..."
21
38
exit 0
22
39
fi
23
- npm install -g @datadog/datadog-ci@2.10.0
24
- datadog-ci junit upload --service coder ./gotests.xml \
40
+ npm install @datadog/datadog-ci@2.10.0
41
+ npm x datadog-ci junit upload --service coder ./gotests.xml \
25
42
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
26
43
env :
27
44
DATADOG_API_KEY : ${{ inputs.api-key }}
You can’t perform that action at this time.
0 commit comments