mirror of
https://github.com/Sea-Haven-Industries/.github.git
synced 2026-09-30 04:43:12 +00:00
Mutable tags and the dependency-review v5 branch executed inside every consumer, including OIDC deploy jobs. SHA pins with version comments match the policy scanner and let Renovate advance them.
51 lines
1.4 KiB
YAML
51 lines
1.4 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
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
concurrency:
|
|
group: ci-dotnet-${{ github.workflow }}-${{ github.ref }}-${{ inputs.working-directory }}
|
|
cancel-in-progress: true
|
|
defaults:
|
|
run:
|
|
working-directory: ${{ inputs.working-directory }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
|
|
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
|