mirror of
https://github.com/Sea-Haven-Industries/.github.git
synced 2026-09-30 16:23:11 +00:00
Bump all actions/checkout references to @v6 (org target). v4 runs on a node runtime version that is being deprecated; v6 is the verified org standard alongside configure-aws-credentials@v6. Ref: engineering-handbook cicd.md (workflow standardization).
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: CI — .NET
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
dotnet-version:
|
|
description: ".NET SDK version"
|
|
type: string
|
|
default: "8.0.x"
|
|
working-directory:
|
|
description: "Directory containing the solution/project"
|
|
type: string
|
|
default: "."
|
|
solution:
|
|
description: "Solution or project file to build"
|
|
type: string
|
|
default: "*.sln"
|
|
run-tests:
|
|
description: "Run dotnet test"
|
|
type: boolean
|
|
default: true
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
defaults:
|
|
run:
|
|
working-directory: ${{ inputs.working-directory }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: ${{ inputs.dotnet-version }}
|
|
|
|
- name: Restore
|
|
run: dotnet restore ${{ inputs.solution }}
|
|
|
|
- name: Build
|
|
run: dotnet build ${{ inputs.solution }} --no-restore --configuration Release
|
|
|
|
- name: Test
|
|
if: ${{ inputs.run-tests }}
|
|
run: dotnet test ${{ inputs.solution }} --no-build --configuration Release
|