Files
shared/.github/workflows/lint.yml
T
Gabriel20xx 22887fef03 ci: expand CI checks and make consumer sync opt-in
- Add Go, npm, Python, and Java validation to CI
- Run Go tests against PostgreSQL
- Record performance fixes in the report
2026-10-19 21:14:31 +00:00

97 lines
2.3 KiB
YAML

name: Lint
on:
push:
branches:
- "**"
paths:
- '.changeset/**'
- '.github/workflows/**'
- 'backend/**'
- 'packages/**'
- 'scripts/**'
- 'package.json'
- 'package-lock.json'
pull_request:
branches:
- main
- master
paths:
- '.changeset/**'
- '.github/workflows/**'
- 'backend/**'
- 'packages/**'
- 'scripts/**'
- 'package.json'
- 'package-lock.json'
workflow_dispatch: {}
jobs:
node:
name: Lint (Node/Svelte)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Check the generated root stylesheet is current
run: git diff --exit-code -- shared-styles.css
- name: Check for skipped tests
run: npm run media:enforce:no-skipped-tests
- name: Run Node/Svelte lint checks
run: npm run lint
- name: Check Prettier formatting
run: npm run format:check
go:
name: Lint (Go)
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: backend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: backend/go.mod
cache: true
- name: Check gofmt
shell: bash
run: |
mapfile -d '' go_files < <(find . -type f -name '*.go' -print0)
if ((${#go_files[@]})); then
test -z "$(gofmt -l "${go_files[@]}")"
fi
- name: Run go vet
run: go vet ./...
python:
name: Lint (Python)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install package and Ruff
run: python -m pip install --upgrade pip ruff -e packages/python-backend
- name: Run Ruff
run: ruff check packages/python-backend/src packages/python-backend/tests