Skip to content

Commit

Permalink
Merge branch 'FEAT/web-dashboard' of https://github.com/bisohns/saido
Browse files Browse the repository at this point in the history
…into FEAT/web-dashboard
  • Loading branch information
Nurudeen38 committed Nov 16, 2022
2 parents cfce55d + 8fd0115 commit 4f59148
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 18 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: goreleaser
on:
push:
branches: [main]
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '>=1.19.3'
cache: true
- run: make dependencies
- run: make build-frontend
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

15 changes: 10 additions & 5 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches: [ main, develop ]
branches: [ main, develop]
pull_request:
branches: [ main ]
branches: [ main]
name: Test-MacOs
jobs:
test:
Expand All @@ -11,11 +11,16 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: '>=1.16'
- name: Checkout code
uses: actions/checkout@v2
- name: Setup config script
# using locals for mac-OS because github CI mac platforms don't have docker
run: make prep-ci-local
run: |
make prep-ci-local
make dependencies
make build-frontend
- name: Test
run: go test -v ./...
run: |
go mod tidy
go test -v ./...
15 changes: 10 additions & 5 deletions .github/workflows/test-ssh.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches: [ main, develop ]
branches: [ main, develop]
pull_request:
branches: [ main ]
branches: [ main]
name: Test-Linux
jobs:
test:
Expand All @@ -11,11 +11,16 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: '>=1.16'
- name: Checkout code
uses: actions/checkout@v2
- name: Setup SSH server and config
# run docker ssh container for ssh tests
run: make prep-ci-ssh
run: |
make prep-ci-ssh
make dependencies
make build-frontend
- name: Test
run: go test -v ./...
run: |
go mod tidy
go test -v ./...
15 changes: 10 additions & 5 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches: [ main, develop ]
branches: [ main, develop]
pull_request:
branches: [ main ]
branches: [ main]
name: Test-Windows
jobs:
test:
Expand All @@ -11,7 +11,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: '>=1.16'
- name: Checkout code
uses: actions/checkout@v2
- name: Choco Install make
Expand All @@ -20,6 +20,11 @@ jobs:
args: install make
- name: Setup config script
# using locals for Windows because github CI Windows platforms don't have docker
run: make prep-ci-local-windows
run: |
make prep-ci-local-windows
make dependencies
make build-frontend
- name: Test
run: go test -v ./...
run: |
go mod tidy
go test -v ./...
39 changes: 39 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
#snapshot:
# name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^intergration:'
- '^assets:'
nfpms:
- maintainer: Bisohns Corp.
description: YAML based tool for monitoring metrics across multiple hosts
homepage: https://github.com/bisohns/saido
license: Apache License 2.0
formats:
- deb
- rpm
- apk
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ endif
dependencies:
ifeq ($(bin),main.exe)
@make prep-ci-local-windows
yarn add react-scripts@latest
else
@make prep-ci-local
endif
Expand All @@ -48,7 +49,7 @@ endif

.PHONY: build-frontend
build-frontend:
cd web && yarn build && cd ..
cd web && export BUILD_PATH=../cmd/build && CI=false yarn build && cd ..

.PHONY: serve-backend
serve-backend:
Expand Down
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "BUILD_PATH='../cmd/build' react-scripts build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand All @@ -50,4 +50,4 @@
"last 1 safari version"
]
}
}
}

0 comments on commit 4f59148

Please sign in to comment.