feat: golang linter
This commit is contained in:
@@ -33,6 +33,13 @@ jobs:
|
||||
- name: Run go vet
|
||||
run: go vet ./...
|
||||
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.61.0
|
||||
args: ./...
|
||||
working-directory: apps/backend
|
||||
|
||||
- name: Run tests with coverage
|
||||
run: |
|
||||
go test -v -race -coverprofile=coverage.out -covermode=atomic -json ./... > test-results.json 2>&1 || true
|
||||
@@ -85,4 +92,3 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./cmd/kandev
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
name: Frontend Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
frontend:
|
||||
name: Run Frontend Lint, Tests, and Build
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: apps
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: apps/pnpm-lock.yaml
|
||||
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: '9'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Run lint
|
||||
run: pnpm --filter @kandev/web lint
|
||||
|
||||
- name: Run tests
|
||||
run: pnpm --filter @kandev/web test
|
||||
|
||||
- name: Build
|
||||
run: pnpm --filter @kandev/web build
|
||||
Reference in New Issue
Block a user