chore: add stats lint/check wiring for CI

This commit is contained in:
2026-03-16 01:54:25 -07:00
parent 64e9821e7a
commit 77c35c770d
4 changed files with 23 additions and 3 deletions

View File

@@ -41,6 +41,9 @@ jobs:
- name: Lint changelog fragments
run: bun run changelog:lint
- name: Lint stats (formatting)
run: bun run lint:stats
- name: Enforce pull request changelog fragments (`skip-changelog` label bypass)
if: github.event_name == 'pull_request'
run: bun run changelog:pr-check --base-ref "origin/${{ github.base_ref }}" --head-ref "HEAD" --labels "${{ join(github.event.pull_request.labels.*.name, ',') }}"

View File

@@ -29,13 +29,19 @@ jobs:
path: |
~/.bun/install/cache
node_modules
stats/node_modules
vendor/subminer-yomitan/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'vendor/subminer-yomitan/package-lock.json') }}
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'stats/bun.lock', 'vendor/subminer-yomitan/package-lock.json') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install --frozen-lockfile
run: |
bun install --frozen-lockfile
cd stats && bun install --frozen-lockfile
- name: Lint stats (formatting)
run: bun run lint:stats
- name: Build (TypeScript check)
run: bun run typecheck

View File

@@ -1,4 +1,4 @@
.PHONY: help deps build build-launcher install build-linux build-macos build-macos-unsigned clean install-linux install-macos install-windows install-plugin uninstall uninstall-linux uninstall-macos uninstall-windows print-dirs pretty ensure-bun generate-config generate-example-config dev-start dev-start-macos dev-watch dev-watch-macos dev-toggle dev-stop
.PHONY: help deps build build-launcher install build-linux build-macos build-macos-unsigned clean install-linux install-macos install-windows install-plugin uninstall uninstall-linux uninstall-macos uninstall-windows print-dirs pretty lint ensure-bun generate-config generate-example-config dev-start dev-start-macos dev-watch dev-watch-macos dev-toggle dev-stop
APP_NAME := subminer
THEME_SOURCE := assets/themes/subminer.rasi
@@ -74,6 +74,7 @@ help:
" uninstall-macos Remove macOS install artifacts" \
" uninstall-windows Remove Windows mpv plugin artifacts" \
" print-dirs Show resolved install locations" \
" lint Lint stats (format check)" \
"" \
"Variables:" \
" PREFIX=... Override wrapper install prefix (default: $$HOME/.local)" \
@@ -112,6 +113,10 @@ ensure-bun:
pretty: ensure-bun
@bun run format:src
@bun run format:stats
lint: ensure-bun
@bun run lint:stats
build:
@printf '%s\n' "[INFO] Detected platform: $(PLATFORM)"

View File

@@ -26,6 +26,12 @@
"format:check": "prettier --check .",
"format:src": "bash scripts/prettier-scope.sh --write",
"format:check:src": "bash scripts/prettier-scope.sh --check",
"format:stats": "bun x prettier --write stats/index.html stats/package.json stats/src stats/tsconfig.json stats/vite.config.ts",
"format:check:stats": "bun x prettier --check stats/index.html stats/package.json stats/src stats/tsconfig.json stats/vite.config.ts",
"typecheck:stats": "cd stats && bun x tsc --noEmit -p tsconfig.json",
"lint:stats": "bun run format:check:stats",
"lint:stats:typecheck": "bun run typecheck:stats",
"lint": "bun run lint:stats",
"docs:dev": "bun run --cwd docs-site docs:dev",
"docs:build": "bun run --cwd docs-site docs:build",
"docs:preview": "bun run --cwd docs-site docs:preview",