forked from knyar/prometheus-remote-backfill
-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (46 loc) · 1.46 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
cache-dependency-path: "**/go.sum"
- name: Build promdump
working-directory: ./promdump
run: |
go get
go build -ldflags=" -X 'main.CommitHash=$(git rev-parse HEAD)' -X 'main.BuildTime=$(date -Iseconds)'" -v ./...
- name: Test promdump
working-directory: ./promdump
run: go test -v ./...
- name: Build promremotewrite
working-directory: ./promremotewrite
run: |
go get
go build -ldflags=" -X 'main.CommitHash=$(git rev-parse HEAD)' -X 'main.BuildTime=$(date -Iseconds)'" -v ./...
- name: Test promremotewrite
working-directory: ./promremotewrite
run: go test -v ./...
- name: Compress artifacts
run: |
gzip promdump/promdump
gzip promremotewrite/promremotewrite
- name: Upload promdump
uses: actions/upload-artifact@v4
with:
name: promdump
path: promdump/promdump.gz
- name: Upload promremotewrite
uses: actions/upload-artifact@v4
with:
name: promremotewrite
path: promremotewrite/promremotewrite.gz