Skip to content

refactor: code quality cleanup — dead code, boilerplate, types, constants, AI comments #234

refactor: code quality cleanup — dead code, boilerplate, types, constants, AI comments

refactor: code quality cleanup — dead code, boilerplate, types, constants, AI comments #234

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22'
- run: npm ci
- run: npm run typecheck
- run: npm run lint
- run: npm run format:check
- run: npm run test
- name: Check version bump and new features note
if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request'
run: |
git fetch origin main
MAIN_VERSION=$(git show origin/main:package.json | grep '"version"' | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
CURR_VERSION=$(grep '"version"' package.json | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
MAIN_TAURI_VERSION=$(git show origin/main:src-tauri/tauri.conf.json | grep '"version"' | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
CURR_TAURI_VERSION=$(grep '"version"' src-tauri/tauri.conf.json | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
if [ "$MAIN_VERSION" != "$CURR_VERSION" ]; then
echo "package.json version bumped. Checking for New Features note..."
if [ ! -f "notes/New Features in v${CURR_VERSION}.md" ]; then
echo "Error: Missing notes/New Features in v${CURR_VERSION}.md for package.json version"
exit 1
fi
fi
if [ "$MAIN_TAURI_VERSION" != "$CURR_TAURI_VERSION" ]; then
echo "tauri.conf.json version bumped. Checking for New Features note..."
if [ ! -f "notes/New Features in v${CURR_TAURI_VERSION}.md" ]; then
echo "Error: Missing notes/New Features in v${CURR_TAURI_VERSION}.md for tauri.conf.json version"
exit 1
fi
fi