better build and stuff
All checks were successful
Check / checks (push) Successful in 3m28s

This commit is contained in:
Gustavo Maronato 2023-09-21 22:56:01 -03:00
parent 6aab889ed1
commit c00d6ecca7
Signed by: maronato
SSH Key Fingerprint: SHA256:2Gw7kwMz/As+2UkR1qQ/qYYhn+WNh3FGv6ozhoRrLcs
3 changed files with 28 additions and 5 deletions

View File

@ -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

View File

@ -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 ./...

View File

@ -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": {