This commit is contained in:
parent
6aab889ed1
commit
c00d6ecca7
|
@ -1,4 +1,4 @@
|
||||||
name: Go
|
name: Check
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -20,13 +20,26 @@ jobs:
|
||||||
go-version: "1.21"
|
go-version: "1.21"
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: golangci-lint
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "18"
|
||||||
|
|
||||||
|
- name: install deps
|
||||||
|
run: make install
|
||||||
|
|
||||||
|
- name: lint frontend
|
||||||
|
run: make lint-frontend
|
||||||
|
|
||||||
|
- name: create fake frontend file for backend linting
|
||||||
|
run: mkdir frontend/dist && touch frontend/dist/index.html
|
||||||
|
|
||||||
|
- name: lint backend
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: v1.54
|
version: v1.54
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
run: make build
|
run: make all
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
run: make test
|
run: make test
|
13
Makefile
13
Makefile
|
@ -24,8 +24,17 @@ serve:
|
||||||
dev:
|
dev:
|
||||||
go run goshort.go dev
|
go run goshort.go dev
|
||||||
|
|
||||||
lint:
|
lint-frontend:
|
||||||
|
VITE_API_URL=/api npm run --prefix frontend lint
|
||||||
|
|
||||||
|
lint-frontend-fix:
|
||||||
|
VITE_API_URL=/api npm run --prefix frontend lint:fix
|
||||||
|
|
||||||
|
lint-backend:
|
||||||
golangci-lint run
|
golangci-lint run
|
||||||
|
|
||||||
lint-fix:
|
lint-backend-fix:
|
||||||
golangci-lint run --fix
|
golangci-lint run --fix
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test -v ./...
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||||
|
"lint:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --fix",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user