File tree Expand file tree Collapse file tree 3 files changed +31
-44
lines changed Expand file tree Collapse file tree 3 files changed +31
-44
lines changed Original file line number Diff line number Diff line change 1
- name : Run k6 Test Suite
2
- on :
3
- push :
4
- paths :
5
- - ' scripts/**'
6
- - ' k6/**'
7
- release :
8
- types :
9
- - created
10
-
11
- # Important: The k6 test suite will only be run against the latest
12
- # release of the Quickpizza service, not against the code in the
13
- # commit itself. Therefore, we only run this Action when the test
14
- # files themselves are modified (or on a new release).
1
+ name : Build and Test
2
+ on : [push]
15
3
16
4
jobs :
17
5
runner-job :
18
6
runs-on : ubuntu-latest
19
7
20
- services :
21
- quickpizza :
22
- image : ghcr.io/grafana/quickpizza-local:latest
23
- ports :
24
- - 3333:3333
25
- - 3334:3334
26
-
27
8
steps :
28
9
- name : Checkout
29
10
uses : actions/checkout@v4
30
11
12
+ - name : Setup Go
13
+ uses : actions/setup-go@v5
14
+
15
+ - name : Setup Goimports
16
+ run : go install golang.org/x/tools/cmd/goimports@latest
17
+
18
+ - uses : actions/setup-node@v4
19
+ with :
20
+ node-version : 18
21
+
22
+ - name : Check Formatting
23
+ run : make format-check
24
+
25
+ - name : Build Binary
26
+ run : make build
27
+
28
+ - name : Start Server
29
+ run : ./bin/quickpizza &
30
+
31
31
# Enable cache for system files: https://github.com/actions/toolkit/issues/946
32
32
- name : root suid tar
33
33
run : sudo chown root /bin/tar && sudo chmod u+s /bin/tar
72
72
run : ./scripts/run-tests.sh -t **/k6/browser/*.js -u http://localhost:3333
73
73
env :
74
74
ACT : ${{ env.ACT }}
75
+
76
+ - name : Stop Server
77
+ run : pkill -9 quickpizza
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
GO_SOURCES =$(shell find . -type f -name '* .go' -not -path "./vendor/* ")
2
2
3
- # Note: does not include frontend files, only Go code.
4
3
.PHONY : build
5
4
build :
5
+ PUBLIC_BACKEND_ENDPOINT=" " PUBLIC_BACKEND_WS_ENDPOINT=" " cd pkg/web && \
6
+ npm install && npm run build
7
+ go build -o bin/quickpizza ./cmd
8
+
9
+ # Note: does not include frontend files, only Go code.
10
+ .PHONY : build-mock
11
+ build-mock :
6
12
go build -tags=mock -o bin/quickpizza ./cmd
7
13
8
14
.PHONY : proto
You can’t perform that action at this time.
0 commit comments