Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ jobs:
with:
go-version: '1.19'

- name: gotestsum
run: go install gotest.tools/gotestsum@latest

- name: install ./...
run: go install ./...

- name: test ./...
run: go test --tags=examples ./...
run: gotestsum --junitfile junit.xml -- --tags=examples ./...
env:
PG_USER: postgres
PG_HOST: localhost
Expand All @@ -55,3 +58,8 @@ jobs:
- name: build internal/endtoend
run: go build ./...
working-directory: internal/endtoend/testdata

- name: report
run: ./scripts/report.sh
env:
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }}
17 changes: 17 additions & 0 deletions scripts/report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

curl \
-X POST \
--fail-with-body \
-H "Authorization: Token token=\"$BUILDKITE_ANALYTICS_TOKEN\"" \
-F "data=@junit.xml" \
-F "format=junit" \
-F "run_env[CI]=buildkite" \
-F "run_env[key]=$GITHUB_RUN_ID" \
-F "run_env[number]=$GITHUB_RUN_NUMBER-$GITHUB_RUN_ATTEMPT" \
-F "run_env[job_id]=$GITHUB_RUN_ID" \
-F "run_env[branch]=$GITHUB_REF" \
-F "run_env[commit_sha]=$GITHUB_SHA" \
-F "run_env[message]=Foo" \
-F "run_env[url]=$GITHUB_SERVER_URL" \
https://analytics-api.buildkite.com/v1/uploads