From 3811351380fa34958ae00d1c4a1a1abe88fbe900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Senart?= Date: Sat, 30 Sep 2023 18:11:25 +0200 Subject: [PATCH] axiom: initial github action --- .github/workflows/axiom-clickbench.yml | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/axiom-clickbench.yml diff --git a/.github/workflows/axiom-clickbench.yml b/.github/workflows/axiom-clickbench.yml new file mode 100644 index 000000000..d3cf9cc9b --- /dev/null +++ b/.github/workflows/axiom-clickbench.yml @@ -0,0 +1,52 @@ +name: Clickbench Axiom + +on: + push: + branches: + - main + schedule: + - cron: "*/10 * * * *" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + env: + AXIOM_URL: ${{ secrets.AXIOM_URL }} + AXIOM_ORG_ID: ${{ secrets.AXIOM_ORG_ID }} + AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }} + AXIOM_TRACE_URL: ${{ secrets.AXIOM_TRACE_URL }} + AXIOM_RESULTS_DATASET: ${{ secrets.AXIOM_RESULTS_DATASET }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Format Check + run: | + set -euo pipefail + go install golang.org/x/tools/cmd/goimports@latest + goimports -w . + git diff --exit-code + + - name: Vet + run: go vet ./... + + - name: Run axiom-clickbench + run: | + cd axiom/ + go build + + ./axiom-clickbench run -trace-url=$AXIOM_TRACE_URL < queries.apl | tee events.json + + - name: Ingest events into results dataset + uses: axiomhq/cli + run: | + axiom ingest $AXIOM_RESULTS_DATASET --content-type json < events.json