Skip to content

Commit 406e364

Browse files
committed
build: Send test logs to Grafana Loki for statistics
1 parent 9d21b91 commit 406e364

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build-syncthing.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,19 @@ jobs:
6969
run: |
7070
go run build.go
7171
72+
- name: Install go-test-json-to-loki
73+
run: |
74+
go install calmh.dev/go-test-json-to-loki@latest
75+
7276
- name: Test
7377
run: |
74-
go run build.go test
78+
go run build.go test | go-test-json-to-loki
79+
env:
80+
GOFLAGS: "-json"
81+
LOKI_URL: ${{ secrets.LOKI_URL }}
82+
LOKI_USER: ${{ secrets.LOKI_USER }}
83+
LOKI_PASSWORD: ${{ secrets.LOKI_PASSWORD }}
84+
LOKI_LABELS: "go=${{ matrix.go }},runner=${{ matrix.runner }},repo=${{ github.repository }},ref=${{ github.ref }}"
7585

7686
#
7787
# Meta checks for formatting, copyright, etc

0 commit comments

Comments
 (0)