Skip to content

revert: "ci: cache datadog-ci (#9702)" #9828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions .github/actions/upload-datadog/action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload tests to Datadog
name: Upload tests to datadog
if: always()
inputs:
api-key:
Expand All @@ -7,26 +7,8 @@ inputs:
runs:
using: "composite"
steps:
- name: Set work dir
shell: bash
run: |
WORK_DIR=${{ runner.temp }}/datadog-ci
mkdir -p $WORK_DIR
echo "WORK_DIR=$WORK_DIR" >> $GITHUB_ENV
# The npm install was taking 30s to 1m, accounting for 20+% of the total
# job time.
- name: Cache datadog-ci
uses: buildjet/cache@v3
with:
path: |
${{ env.WORK_DIR }}
key: datadog-ci-${{ runner.os }}
restore-keys: |
datadog-ci-${{ runner.os }}-
datadog-ci-
- shell: bash
run: |
cd ${{ env.WORK_DIR }}
owner=${{ github.repository_owner }}
echo "owner: $owner"
if [[ $owner != "coder" ]]; then
Expand All @@ -38,8 +20,8 @@ runs:
echo "No API key provided, skipping..."
exit 0
fi
npm install @datadog/datadog-ci@2.10.0
npm x -- datadog-ci junit upload --service coder ./gotests.xml \
npm install -g @datadog/datadog-ci@2.10.0
datadog-ci junit upload --service coder ./gotests.xml \
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
env:
DATADOG_API_KEY: ${{ inputs.api-key }}