Compare commits
1
Commits
main
...
7f983853b0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f983853b0 |
@@ -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: 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
|
||||||
@@ -50,20 +50,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify Linters
|
- name: Verify Linters
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
if: >
|
||||||
FAILED=0
|
steps.html_lint.outcome != 'success' ||
|
||||||
if [ "${{ steps.html_lint.outcome }}" != "success" ]; then
|
steps.style_lint.outcome != 'success' ||
|
||||||
echo "HTML Linter failed"
|
steps.js_lint.outcome != 'success'
|
||||||
FAILED=1
|
run: exit 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
|
|
||||||
Reference in New Issue
Block a user