mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 03:16:46 -07:00
chore: add stats lint/check wiring for CI
This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -41,6 +41,9 @@ jobs:
|
|||||||
- name: Lint changelog fragments
|
- name: Lint changelog fragments
|
||||||
run: bun run changelog:lint
|
run: bun run changelog:lint
|
||||||
|
|
||||||
|
- name: Lint stats (formatting)
|
||||||
|
run: bun run lint:stats
|
||||||
|
|
||||||
- name: Enforce pull request changelog fragments (`skip-changelog` label bypass)
|
- name: Enforce pull request changelog fragments (`skip-changelog` label bypass)
|
||||||
if: github.event_name == 'pull_request'
|
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, ',') }}"
|
run: bun run changelog:pr-check --base-ref "origin/${{ github.base_ref }}" --head-ref "HEAD" --labels "${{ join(github.event.pull_request.labels.*.name, ',') }}"
|
||||||
|
|||||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -29,13 +29,19 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/.bun/install/cache
|
~/.bun/install/cache
|
||||||
node_modules
|
node_modules
|
||||||
|
stats/node_modules
|
||||||
vendor/subminer-yomitan/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: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
- name: Install dependencies
|
- 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)
|
- name: Build (TypeScript check)
|
||||||
run: bun run typecheck
|
run: bun run typecheck
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -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
|
APP_NAME := subminer
|
||||||
THEME_SOURCE := assets/themes/subminer.rasi
|
THEME_SOURCE := assets/themes/subminer.rasi
|
||||||
@@ -74,6 +74,7 @@ help:
|
|||||||
" uninstall-macos Remove macOS install artifacts" \
|
" uninstall-macos Remove macOS install artifacts" \
|
||||||
" uninstall-windows Remove Windows mpv plugin artifacts" \
|
" uninstall-windows Remove Windows mpv plugin artifacts" \
|
||||||
" print-dirs Show resolved install locations" \
|
" print-dirs Show resolved install locations" \
|
||||||
|
" lint Lint stats (format check)" \
|
||||||
"" \
|
"" \
|
||||||
"Variables:" \
|
"Variables:" \
|
||||||
" PREFIX=... Override wrapper install prefix (default: $$HOME/.local)" \
|
" PREFIX=... Override wrapper install prefix (default: $$HOME/.local)" \
|
||||||
@@ -112,6 +113,10 @@ ensure-bun:
|
|||||||
|
|
||||||
pretty: ensure-bun
|
pretty: ensure-bun
|
||||||
@bun run format:src
|
@bun run format:src
|
||||||
|
@bun run format:stats
|
||||||
|
|
||||||
|
lint: ensure-bun
|
||||||
|
@bun run lint:stats
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@printf '%s\n' "[INFO] Detected platform: $(PLATFORM)"
|
@printf '%s\n' "[INFO] Detected platform: $(PLATFORM)"
|
||||||
|
|||||||
@@ -26,6 +26,12 @@
|
|||||||
"format:check": "prettier --check .",
|
"format:check": "prettier --check .",
|
||||||
"format:src": "bash scripts/prettier-scope.sh --write",
|
"format:src": "bash scripts/prettier-scope.sh --write",
|
||||||
"format:check:src": "bash scripts/prettier-scope.sh --check",
|
"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:dev": "bun run --cwd docs-site docs:dev",
|
||||||
"docs:build": "bun run --cwd docs-site docs:build",
|
"docs:build": "bun run --cwd docs-site docs:build",
|
||||||
"docs:preview": "bun run --cwd docs-site docs:preview",
|
"docs:preview": "bun run --cwd docs-site docs:preview",
|
||||||
|
|||||||
Reference in New Issue
Block a user