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