initial workflows
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
name: Static Analysis -- Golang
|
||||||
|
run-name: 'Static Analysis -- Golang -- ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- '**/*.go'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check Out Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
|
- 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
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
name: Code Style -- Web Components
|
||||||
|
run-name: 'Code Style -- Web Components -- ${{ gitea.repository }} ${{ gitea.ref_name }} ${{ gitea.sha }}'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
paths:
|
||||||
|
- '**/*.html'
|
||||||
|
- '**/*.css'
|
||||||
|
- '**/*.js'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check Out Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
|
- name: Initialize Runner
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
|
||||||
|
- name: Install Linters
|
||||||
|
run: |
|
||||||
|
npm install --no-save \
|
||||||
|
@eslint/eslintrc \
|
||||||
|
@eslint/js \
|
||||||
|
eslint \
|
||||||
|
globals \
|
||||||
|
html-validate \
|
||||||
|
stylelint \
|
||||||
|
stylelint-config-standard
|
||||||
|
|
||||||
|
- name: Verify Linters
|
||||||
|
run: |
|
||||||
|
npx html-validate --version
|
||||||
|
npx stylelint --version
|
||||||
|
npx eslint --version
|
||||||
|
|
||||||
|
- name: Run HTMLValidate
|
||||||
|
id: style-html
|
||||||
|
run: npx html-validate --config dev_config/.htmlvalidate.json 'web/html/**/*.html'
|
||||||
|
|
||||||
|
- name: Run Stylelint
|
||||||
|
id: style-css
|
||||||
|
if: always()
|
||||||
|
run: npx stylelint --config dev_config/.stylelintrc.json --formatter verbose 'web/css/**/*.css'
|
||||||
|
|
||||||
|
- name: Run ESLint
|
||||||
|
id: style-js
|
||||||
|
if: always()
|
||||||
|
run: npx eslint --config dev_config/eslint.config.mjs web/scripts/**/*.js
|
||||||
|
|
||||||
|
- name: Verify Linters
|
||||||
|
if: >
|
||||||
|
steps.style-html.outcome != 'success' ||
|
||||||
|
steps.style-css.outcome != 'success' ||
|
||||||
|
steps.style-js.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
Reference in New Issue
Block a user