add static analysis action
ProxmoxAAS-Dashboard Go Static Analysis Check / lint-check (push) Failing after 3s
ProxmoxAAS-Dashboard Code Style Check / lint-check (push) Successful in 13s

This commit is contained in:
alu
2026-07-29 17:57:32 +00:00
parent ce1576fbd6
commit 94f26ebee2
3 changed files with 44 additions and 22 deletions
+31
View File
@@ -0,0 +1,31 @@
name: ProxmoxAAS-Dashboard Go Static Analysis Check
run-name: Go static analysis check on ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}
on:
push:
branches:
- "*"
jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- name: Check Out Repository
uses: actions/checkout@v4
- name: Initialize Runner
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
- name: Initialize Go
run: make build-web && go get .
- name: Run Go Vet
id: static_govet
if: always()
run: go vet ./...
- name: Verify Static Analysis
if: >
steps.static_govet.outcome != 'success'
run: exit 1
+5 -18
View File
@@ -49,21 +49,8 @@ jobs:
run: npx eslint --config dev_config/eslint.config.mjs --fix web/scripts/
- name: Verify Linters
if: always()
run: |
FAILED=0
if [ "${{ steps.html_lint.outcome }}" != "success" ]; then
echo "HTML Linter failed"
FAILED=1
fi
if [ "${{ steps.style_lint.outcome }}" != "success" ]; then
echo "Style Linter failed"
FAILED=1
fi
if [ "${{ steps.js_lint.outcome }}" != "success" ]; then
echo "JS Linter failed"
FAILED=1
fi
if [ $FAILED -eq 1 ]; then
exit 1
fi
if: >
steps.html_lint.outcome != 'success' ||
steps.style_lint.outcome != 'success' ||
steps.js_lint.outcome != 'success'
run: exit 1
+8 -4
View File
@@ -1,13 +1,17 @@
.PHONY: build test clean wfa-js
build: clean build-wfa-js
build: clean ensure-dist build-web build-wfa-js
@echo "======================== Building Binary ======================="
mkdir -p dist
# resolve symbolic links in web by copying it into dist/web/
cp -rL web/ dist/web/
CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ .
build-wfa-js:
ensure-dist:
mkdir -p dist
build-web: ensure-dist
cp -rL web/ dist/web/
build-wfa-js: ensure-dist
$(MAKE) -C WFA-JS
cp -f WFA-JS/dist/* web/modules