Skip to content

bump to .net 9 at analyzers action #178

bump to .net 9 at analyzers action

bump to .net 9 at analyzers action #178

name: Build and test
on:
push:
pull_request:
env:
# Stop wasting time caching packages
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending usage data to Microsoft
DOTNET_CLI_TELEMETRY_OPTOUT: true
# Kill other jobs when we trigger this workflow by sending new commits
# to the PR.
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.x
9.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release
analyzers:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
- name: Restore tools
run: dotnet tool restore
- name: Build solution
run: dotnet build -c Release Giraffe.sln
- name: Run Analyzers
run: dotnet msbuild /t:AnalyzeFSharpProject src/Giraffe/Giraffe.fsproj
# This is important, you want to continue your Action even if you found problems.
# As you always want the report to upload
continue-on-error: true
# checkout code, build, run analyzers, ...
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
# You can also specify the path to a folder for `sarif_file`
sarif_file: ./src/Giraffe/analysis.sarif