Skip to content

Correct the review count, give the extension a stable id, and put it under CI #54

Correct the review count, give the extension a stable id, and put it under CI

Correct the review count, give the extension a stable id, and put it under CI #54

Workflow file for this run

name: Build
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
name: Build & format check
runs-on: windows-latest
steps:
# .editorconfig requires CRLF line endings, and .cs files are committed
# as LF (no .gitattributes normalizes this). Force checkout to produce
# CRLF so `dotnet format whitespace` sees the same line endings as a
# local Windows dev machine, regardless of the runner image's git default.
- name: Configure git to check out CRLF line endings
run: git config --global core.autocrlf true
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
cache: true
# No packages.lock.json in this repo (setup-dotnet's cache default),
# so key the NuGet cache off the csproj's pinned package versions instead.
cache-dependency-path: WitcherScriptMerger/WitcherScriptMerger.csproj
- name: Restore
run: dotnet restore WitcherScriptMerger.sln
- name: Build
run: dotnet build WitcherScriptMerger.sln --no-restore --configuration Release
- name: Verify formatting
run: dotnet format whitespace WitcherScriptMerger.sln --verify-no-changes
# The Vortex extension is roughly half of recent activity in this repo and had no CI
# coverage at all - build.yml ran only .NET steps, so a TypeScript compile error, a lint
# failure, or a broken test could land on main unnoticed. Runs on ubuntu (no .NET or
# Windows dependency here) and only when the extension actually changed.
vortex-extension:
name: Vortex extension (typecheck, lint, test)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: vortex-extension/package-lock.json
# `npm ci` (not `npm install`) so the lockfile is authoritative and a drifted
# lockfile fails the build instead of being silently rewritten.
- name: Install dependencies
working-directory: vortex-extension
run: npm ci
- name: Typecheck
working-directory: vortex-extension
run: npm run typecheck
- name: Lint
working-directory: vortex-extension
run: npm run lint
# `npm test` is the src/ unit suite. The test/ integration suite is deliberately NOT
# run here: it spawns a real WitcherScriptMerger binary, which CI has no copy of.
- name: Test
working-directory: vortex-extension
run: npm test