Le repo cible net10.0 partout (csproj, TFM), mais le workflow CI Forgejo buildAndTest installait une SDK 9.0.x. Aligne sur 10.0.x pour que la CI build avec une SDK qui connaît le TFM net10.0. Pas de global.json ajouté : la SDK est résolue à l'installation de l'image runner, le repo reste agnostique de la version exacte.
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
# This workflow will build a .NET project
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
|
name: Dotnet build and test
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
description: 'Log level'
|
|
required: true
|
|
default: 'warning'
|
|
type: choice
|
|
options:
|
|
- info
|
|
- warning
|
|
- debug
|
|
tags:
|
|
description: 'Test scenario tags'
|
|
required: false
|
|
type: boolean
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
log-the-inputs:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- run: |
|
|
echo "Log level: $LEVEL"
|
|
echo "Tags: $TAGS"
|
|
echo "Environment: $ENVIRONMENT"
|
|
env:
|
|
LEVEL: ${{ inputs.logLevel }}
|
|
TAGS: ${{ inputs.tags }}
|
|
|
|
build:
|
|
|
|
runs-on: debian-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: 10.0.x
|
|
- name: Restore dependencies
|
|
run: dotnet restore
|
|
- name: Build
|
|
run: dotnet build --no-restore
|
|
- name: Test
|
|
run: dotnet test --no-build --verbosity normal
|