Skip to content

Commit 4f59148

Browse files
committed
Merge branch 'FEAT/web-dashboard' of https://github.com/bisohns/saido into FEAT/web-dashboard
2 parents cfce55d + 8fd0115 commit 4f59148

File tree

7 files changed

+101
-18
lines changed

7 files changed

+101
-18
lines changed

Diff for: .github/workflows/release.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: goreleaser
2+
on:
3+
push:
4+
branches: [main]
5+
tags:
6+
- 'v*'
7+
jobs:
8+
goreleaser:
9+
runs-on: ubuntu-latest
10+
if: success() && startsWith(github.ref, 'refs/tags/')
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-go@v3
16+
with:
17+
go-version: '>=1.19.3'
18+
cache: true
19+
- run: make dependencies
20+
- run: make build-frontend
21+
- uses: goreleaser/goreleaser-action@v2
22+
with:
23+
distribution: goreleaser
24+
version: latest
25+
args: release --rm-dist
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
28+

Diff for: .github/workflows/test-macos.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ main, develop ]
3+
branches: [ main, develop]
44
pull_request:
5-
branches: [ main ]
5+
branches: [ main]
66
name: Test-MacOs
77
jobs:
88
test:
@@ -11,11 +11,16 @@ jobs:
1111
- name: Install Go
1212
uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.16
14+
go-version: '>=1.16'
1515
- name: Checkout code
1616
uses: actions/checkout@v2
1717
- name: Setup config script
1818
# using locals for mac-OS because github CI mac platforms don't have docker
19-
run: make prep-ci-local
19+
run: |
20+
make prep-ci-local
21+
make dependencies
22+
make build-frontend
2023
- name: Test
21-
run: go test -v ./...
24+
run: |
25+
go mod tidy
26+
go test -v ./...

Diff for: .github/workflows/test-ssh.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ main, develop ]
3+
branches: [ main, develop]
44
pull_request:
5-
branches: [ main ]
5+
branches: [ main]
66
name: Test-Linux
77
jobs:
88
test:
@@ -11,11 +11,16 @@ jobs:
1111
- name: Install Go
1212
uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.16
14+
go-version: '>=1.16'
1515
- name: Checkout code
1616
uses: actions/checkout@v2
1717
- name: Setup SSH server and config
1818
# run docker ssh container for ssh tests
19-
run: make prep-ci-ssh
19+
run: |
20+
make prep-ci-ssh
21+
make dependencies
22+
make build-frontend
2023
- name: Test
21-
run: go test -v ./...
24+
run: |
25+
go mod tidy
26+
go test -v ./...

Diff for: .github/workflows/test-windows.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
on:
22
push:
3-
branches: [ main, develop ]
3+
branches: [ main, develop]
44
pull_request:
5-
branches: [ main ]
5+
branches: [ main]
66
name: Test-Windows
77
jobs:
88
test:
@@ -11,7 +11,7 @@ jobs:
1111
- name: Install Go
1212
uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.16
14+
go-version: '>=1.16'
1515
- name: Checkout code
1616
uses: actions/checkout@v2
1717
- name: Choco Install make
@@ -20,6 +20,11 @@ jobs:
2020
args: install make
2121
- name: Setup config script
2222
# using locals for Windows because github CI Windows platforms don't have docker
23-
run: make prep-ci-local-windows
23+
run: |
24+
make prep-ci-local-windows
25+
make dependencies
26+
make build-frontend
2427
- name: Test
25-
run: go test -v ./...
28+
run: |
29+
go mod tidy
30+
go test -v ./...

Diff for: .goreleaser.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- go generate ./...
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
- windows
11+
- darwin
12+
archives:
13+
- replacements:
14+
darwin: Darwin
15+
linux: Linux
16+
windows: Windows
17+
386: i386
18+
amd64: x86_64
19+
checksum:
20+
name_template: 'checksums.txt'
21+
#snapshot:
22+
# name_template: "{{ incpatch .Version }}-next"
23+
changelog:
24+
sort: asc
25+
filters:
26+
exclude:
27+
- '^docs:'
28+
- '^test:'
29+
- '^intergration:'
30+
- '^assets:'
31+
nfpms:
32+
- maintainer: Bisohns Corp.
33+
description: YAML based tool for monitoring metrics across multiple hosts
34+
homepage: https://github.com/bisohns/saido
35+
license: Apache License 2.0
36+
formats:
37+
- deb
38+
- rpm
39+
- apk

Diff for: Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ endif
4040
dependencies:
4141
ifeq ($(bin),main.exe)
4242
@make prep-ci-local-windows
43+
yarn add react-scripts@latest
4344
else
4445
@make prep-ci-local
4546
endif
@@ -48,7 +49,7 @@ endif
4849

4950
.PHONY: build-frontend
5051
build-frontend:
51-
cd web && yarn build && cd ..
52+
cd web && export BUILD_PATH=../cmd/build && CI=false yarn build && cd ..
5253

5354
.PHONY: serve-backend
5455
serve-backend:

Diff for: web/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"scripts": {
3030
"start": "react-scripts start",
31-
"build": "BUILD_PATH='../cmd/build' react-scripts build",
31+
"build": "react-scripts build",
3232
"test": "react-scripts test",
3333
"eject": "react-scripts eject"
3434
},
@@ -50,4 +50,4 @@
5050
"last 1 safari version"
5151
]
5252
}
53-
}
53+
}

0 commit comments

Comments
 (0)