Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit dea739b

Browse files
Update build scripts (#509)
* first cut * update * update codeql * update codeql
1 parent f8f9e74 commit dea739b

File tree

4 files changed

+25
-44
lines changed

4 files changed

+25
-44
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
with:
2727
fetch-depth: 0
2828

29-
- name: Setup net6
29+
- name: Setup SKDs
3030
uses: actions/setup-dotnet@v1
3131
with:
3232
dotnet-version: |
33-
3.1.x
3433
6.0.x
34+
7.0.x
3535
3636
- run: dotnet --info
3737

.github/workflows/codeql.yml

+19-30
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,51 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ "main" ]
16+
branches: [ main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ "main" ]
19+
branches: [ main ]
2020
schedule:
21-
- cron: '34 16 * * 6'
21+
- cron: '39 8 * * 1'
2222

2323
jobs:
2424
analyze:
2525
name: Analyze
2626
runs-on: ubuntu-latest
27-
permissions:
28-
actions: read
29-
contents: read
30-
security-events: write
3127

3228
strategy:
3329
fail-fast: false
3430
matrix:
3531
language: [ 'csharp' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33+
# Learn more:
34+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3835

3936
steps:
4037
- name: Checkout repository
4138
uses: actions/checkout@v3
4239

40+
- name: Setup dotnet
41+
uses: actions/setup-dotnet@v2
42+
with:
43+
dotnet-version: |
44+
6.0.x
45+
7.0.x
46+
47+
- run: dotnet --info
48+
4349
# Initializes the CodeQL tools for scanning.
4450
- name: Initialize CodeQL
4551
uses: github/codeql-action/init@v2
4652
with:
4753
languages: ${{ matrix.language }}
54+
tools: latest
4855
# If you wish to specify custom queries, you can do so here or in a config file.
4956
# By default, queries listed here will override any specified in a config file.
5057
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# 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
53-
# queries: security-extended,security-and-quality
54-
55-
56-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57-
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
60-
61-
# ℹ️ Command-line programs to run using the OS shell.
62-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63-
64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
65-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66-
67-
# - run: |
68-
# echo "Run, Build Application using script"
69-
# ./location_of_script_within_repo/buildscript.sh
58+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
7059

60+
- run: ./build.sh build
61+
7162
- name: Perform CodeQL Analysis
7263
uses: github/codeql-action/analyze@v2
73-
with:
74-
category: "/language:${{matrix.language}}"

test/UnitTests/Infrastructure/FileName.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal static class FileName
99
{
1010
public static string Create(string name)
1111
{
12-
#if NETCOREAPP2_1 || NETCOREAPP3_1 || NET5_0 || NET6_0
12+
#if NETCOREAPP2_1 || NETCOREAPP3_1 || NET5_0 || NET6_0 || NET7_0
1313
var fullName = Path.Combine(System.AppContext.BaseDirectory, "documents", name);
1414
#else
1515
var fullName = Path.Combine(Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationBasePath, "documents", name);

test/UnitTests/UnitTests.csproj

+3-11
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
<!--Conditional compilation-->
99
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
10-
<TargetFrameworks>net462;net472;netcoreapp3.1;net6.0</TargetFrameworks>
10+
<TargetFrameworks>net462;net472;net6.0;net7.0</TargetFrameworks>
1111
</PropertyGroup>
1212

1313
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' and '$(NETCoreSdkPortableRuntimeIdentifier)' != 'osx-arm64' ">
14-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
14+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
1515
</PropertyGroup>
1616

1717
<PropertyGroup Condition=" '$(NETCoreSdkPortableRuntimeIdentifier)' == 'osx-arm64' ">
@@ -35,15 +35,7 @@
3535
<PackageReference Include="FluentAssertions" Version="5.10.3" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
39-
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
40-
</ItemGroup>
41-
42-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
43-
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
44-
</ItemGroup>
45-
46-
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
38+
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' or $(TargetFramework) == 'net7.0' ">
4739
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
4840
</ItemGroup>
4941

0 commit comments

Comments
 (0)