Skip to content

Bump Microsoft.NET.Test.Sdk from 17.13.0 to 18.3.0 #32

Bump Microsoft.NET.Test.Sdk from 17.13.0 to 18.3.0

Bump Microsoft.NET.Test.Sdk from 17.13.0 to 18.3.0 #32

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ─── Build & Lint ────────────────────────────────────────────────────────────
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Build — warnings as errors
run: dotnet build --no-restore --configuration Release -p:TreatWarningsAsErrors=true
# ─── Format Check ────────────────────────────────────────────────────────────
format:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Verify code formatting
# Checks only the main project (excludes vendor/ via Skipping referenced project)
run: dotnet format KNCSDecomp.csproj --verify-no-changes --verbosity diagnostic
# ─── CLI Smoke Test ──────────────────────────────────────────────────────────
smoke-test:
name: CLI Smoke Test
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore and build
run: dotnet restore && dotnet build --no-restore --configuration Release
- name: CLI --help exits cleanly
# Providing a file arg forces CLI mode; --help prints usage and exits 0
run: dotnet run --no-build --configuration Release -- --help dummy.ncs
- name: CLI exits 1 on missing file
# Decompiling a non-existent file should report error and exit non-zero
run: |
dotnet run --no-build --configuration Release -- /nonexistent/file.ncs \
&& echo "ERROR: Expected non-zero exit" && exit 1 \
|| echo "OK: non-zero exit as expected"
# ─── Round-Trip Tests ───────────────────────────────────────────────────────
roundtrip-tests:
name: Round-Trip Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Run round-trip tests
run: dotnet test tests/KNCSDecomp.RoundTripTests/KNCSDecomp.RoundTripTests.csproj --configuration Release --verbosity normal