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