Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bump dotnet-sdk from 10.0.100 to 10.0.101 #417

Bump dotnet-sdk from 10.0.100 to 10.0.101

Bump dotnet-sdk from 10.0.100 to 10.0.101 #417

Workflow file for this run

# 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: Build and test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and test
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
pull-requests: write
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
if: ${{ !github.event.repository.private }}
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Restore packages
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
if: ${{ !github.event.repository.private }}
with:
category: "/language:${{matrix.language}}"
- name: Test
run: >
dotnet test
--no-build
--report-github
--report-github-summary-include-passed=true
--report-github-summary-include-skipped=true
--coverage
--coverage-output $GITHUB_WORKSPACE/tests/coverage/coverage.cobertura.xml
--coverage-output-format cobertura
&& mkdir -p ./tests/report
&& cp $GITHUB_STEP_SUMMARY ./tests/report/results.md
- name: Add test results as pull request comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
header: tests
path: ./tests/report/results.md
- name: Publish code coverage results
uses: danielpalme/[email protected]
with:
reports: ./tests/coverage/coverage.cobertura.xml
targetdir: ./tests/report
reporttypes: MarkdownSummaryGithub
- name: Write code coverage results to summary
run: cat ./tests/report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
- name: Add coverage report as pull request comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
header: coverage
path: ./tests/report/SummaryGithub.md