Add .gitattributes file and normalize line endings #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main build | |
on: | |
workflow_dispatch: # Allow running the workflow manually from the GitHub UI | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
workflow_call: # Allow to be called from the release workflow | |
schedule: | |
- cron: '31 15 * * 0' # Run periodically to keep CodeQL database updated | |
permissions: | |
security-events: write # required for CodeQL | |
packages: read | |
contents: read | |
actions: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-2022, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: csharp | |
build-mode: manual | |
# 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 | |
queries: security-extended | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: ./global.json | |
- name: NuGet Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release /bl:./artifacts/logs/release/build.release.binlog | |
- name: Test | |
run: dotnet test --no-build --configuration Release | |
- name: Publish Test Report | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: .NET Test Reports (${{ matrix.os }}) | |
path: "artifacts/TestResults/**/*.trx" | |
if-no-files-found: error | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: verify-test-results | |
path: | | |
**/*.received.* | |
- name: Upload binlogs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binlogs-${{ matrix.os }} | |
path: ./artifacts/logs | |
if-no-files-found: error | |
# TODO: Wire up building packages. Tracked by #13. | |
# - name: Upload packages | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: packages-${{ matrix.os }} | |
# path: | | |
# ./artifacts/package | |
# if-no-files-found: error | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:csharp" |