60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Lint & Vuln Scan
|
|
description: Runs Go vulnerability scanning and frontend quality checks in parallel.
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
|
|
jobs:
|
|
vulns:
|
|
name: Go vulnerabilities
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.25"
|
|
cache: false
|
|
|
|
- name: Fix node toolcache path for Post-step cleanup
|
|
run: |
|
|
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
|
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
|
|
|
- name: Go vulnerability scan
|
|
working-directory: backend
|
|
run: |
|
|
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
govulncheck ./...
|
|
|
|
frontend:
|
|
name: Frontend lint & types
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Fix node toolcache path for Post-step cleanup
|
|
run: |
|
|
mkdir -p /opt/hostedtoolcache/node/22.23.1/x64/bin
|
|
ln -sf /usr/local/bin/node /opt/hostedtoolcache/node/22.23.1/x64/bin/node
|
|
|
|
- name: Frontend type check
|
|
run: |
|
|
cd frontend
|
|
npm ci
|
|
npm run check
|
|
|
|
- name: Frontend lint
|
|
run: |
|
|
cd frontend
|
|
npm run lint
|