Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 8.0.x
dotnet-quality: ga

# setup-dotnet proves installation, while global.json controls selection. Assert the actual
# resolver result because hosted runners also have newer SDK majors preinstalled.
Expand All @@ -35,7 +36,7 @@ jobs:
fi

- name: Restore
run: dotnet restore -p:NuGetAuditMode=all -warnaserror
run: dotnet restore --locked-mode -p:NuGetAuditMode=all -warnaserror

# Hard gate: the project keeps a zero-warning build, so fail CI on any warning.
- name: Build
Expand Down Expand Up @@ -147,6 +148,7 @@ jobs:
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 8.0.x
dotnet-quality: ga

- name: Verify .NET 8 SDK selection
shell: bash
Expand All @@ -159,7 +161,7 @@ jobs:
fi

- name: Restore and audit dependencies
run: dotnet restore -p:NuGetAuditMode=all -warnaserror
run: dotnet restore --locked-mode -p:NuGetAuditMode=all -warnaserror

- name: Pack and validate public API
run: dotnet pack src/SolSharp/SolSharp.csproj -c Release -o artifacts -p:Version=999.0.0-ci --no-restore -warnaserror
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ on:

permissions:
contents: read
security-events: write

jobs:
analyze:
name: analyze-csharp
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -32,9 +34,20 @@ jobs:
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 8.0.x
dotnet-quality: ga

- name: Verify .NET 8 SDK selection
shell: bash
run: |
selected_version="$(dotnet --version)"
if [[ "${selected_version}" != 8.* ]]; then
echo "Expected a .NET 8 SDK, but dotnet selected ${selected_version}."
dotnet --info
exit 1
fi

- name: Restore
run: dotnet restore -p:NuGetAuditMode=all -warnaserror
run: dotnet restore --locked-mode -p:NuGetAuditMode=all -warnaserror

- name: Build for CodeQL
run: dotnet build --no-restore --configuration Release -warnaserror
Expand Down
Loading
Loading