This commit is contained in:
parent
6aab889ed1
commit
c00d6ecca7
|
@ -1,4 +1,4 @@
|
|||
name: Go
|
||||
name: Check
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
@ -20,13 +20,26 @@ jobs:
|
|||
go-version: "1.21"
|
||||
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
|
||||
with:
|
||||
version: v1.54
|
||||
|
||||
- name: build
|
||||
run: make build
|
||||
run: make all
|
||||
|
||||
- name: test
|
||||
run: make test
|
13
Makefile
13
Makefile
|
@ -24,8 +24,17 @@ serve:
|
|||
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
|
||||
|
||||
lint-fix:
|
||||
lint-backend-fix:
|
||||
golangci-lint run --fix
|
||||
|
||||
test:
|
||||
go test -v ./...
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"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"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user