-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ODS-6169] Update Code Generation to .NET 8 #920
Changes from 29 commits
43e0a0f
c9f5a3c
c006c36
b4e5477
3988624
b66fdfd
cf06f61
2bfa3dc
ef71116
522595b
5f38e5f
8367de0
cd0ce8e
c6c2f6a
18bc8a7
1b9782f
70bbbbb
635d10b
ab18405
ac2f60a
80ae97d
607b89f
e0195b6
82c5929
6de17d2
85bcfb5
8166bd9
2fa0816
1640e46
be5e109
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Declare files that will always have CRLF line endings on checkout. | ||
*.tt eol=crlf | ||
*.ttinclude eol=crlf | ||
DatabaseViews.generated.json text eol=lf | ||
DatabaseViews.mustache text eol=lf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,12 @@ name: EdFi.Admin.DataAccess Pull request build and test | |
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
branches: | ||
- main-6x | ||
paths: | ||
- Application/EdFi.Admin.DataAccess/**/* | ||
- Application/EdFi.Admin.DataAccess.UnitTests/**/* | ||
stephenfuqua marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Application/EdFi.Common/**/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JBrenesSimpat I didn't think of this when reviewing your ticket: we only need to run this action when files in one of these three directories have changed. Please take the same approach with the Security. DataAccess. @semalaiappan you might want to think about doing the same thing in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a small adjustment here, the path for the unit test should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
env: | ||
INFORMATIONAL_VERSION: "6.2" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The I created a ticket to do the same in the |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Licensed to the Ed-Fi Alliance under one or more agreements. | ||
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. | ||
# See the LICENSE and NOTICES files in the project root for more information. | ||
|
||
name: EdFi.Ods.CodeGen Pull Request Build and Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- main-6x | ||
paths: | ||
- Utilities/CodeGeneration/**/* | ||
- Application/EdFi.Common/**/* | ||
|
||
env: | ||
# These vars are used by `build.githubactions.ps1 CheckoutBranch` | ||
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} | ||
HEAD_REF: ${{ GITHUB.HEAD_REF }} | ||
REF_NAME: ${{ GITHUB.REF_NAME }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Ed-Fi-ODS | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
path: Ed-Fi-ODS/ | ||
|
||
- name: Build Code Generation | ||
working-directory: ./Ed-Fi-ODS/Utilities/CodeGeneration | ||
run: | | ||
dotnet build --configuration Release | ||
|
||
- name: Run Unit Tests | ||
working-directory: ./Ed-Fi-ODS/Utilities/CodeGeneration | ||
run: | | ||
dotnet test --filter FullyQualifiedName~UnitTests --logger "trx;LogFileName=unit-tests.trx" --logger "console;verbosity=detailed" | ||
|
||
- name: Upload Unit Test Results | ||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 | ||
if: always() | ||
with: | ||
name: unit-tests | ||
path: ./Ed-Fi-ODS/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/TestResults/unit-tests.trx | ||
retention-days: 5 | ||
if-no-files-found: warn | ||
|
||
# Integration tests require presence of the `Ed-Fi-ODS-Implementation` and `Ed-Fi-Extensions` repositories | ||
- name: Check out Ed-Fi-ODS-Implementation | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation | ||
path: Ed-Fi-ODS-Implementation | ||
|
||
- name: Confirm Branch Exists in Ed-Fi-ODS-Implementation | ||
working-directory: ./Ed-Fi-ODS/ | ||
shell: pwsh | ||
run: | | ||
./build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation" | ||
|
||
- name: Check out Ed-Fi-ODS-Extensions | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
repository: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions | ||
path: Ed-Fi-Extensions | ||
|
||
- name: Confirm Branch Exists in Ed-Fi-Extensions | ||
working-directory: ./Ed-Fi-ODS/ | ||
shell: pwsh | ||
run: | | ||
./build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-Extensions" | ||
|
||
- name: Create Soft Link to Extensions | ||
# For some reason, the integration tests when running in GitHub end up | ||
# looking for the Extensions under Ed-Fi-ODS/Ed-Fi-ODS/Ed-Fi-Extensions, | ||
# instead of looking in Ed-Fi-ODS/Ed-Fi-Extensions. Try resolving this | ||
# by creating a Unix soft link to the directory. | ||
working-directory: ./Ed-Fi-ODS/ | ||
run: | | ||
ln -s ../Ed-Fi-Extensions . | ||
|
||
- name: Run Integration Tests | ||
working-directory: ./Ed-Fi-ODS/Utilities/CodeGeneration | ||
run: | | ||
dotnet test --filter FullyQualifiedName~IntegrationTests --logger "trx;LogFileName=integration-tests.trx" --logger "console;verbosity=detailed" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that I'm logging both to file and to the console. The console logging helps in debugging if there are any failures - you don't have to download the trx file. |
||
|
||
- name: Upload Integration Test Results | ||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 | ||
if: always() | ||
with: | ||
name: integration-tests | ||
path: ./Ed-Fi-ODS/Utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/TestResults/integration-tests.trx | ||
retention-days: 5 | ||
if-no-files-found: warn | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,5 +99,6 @@ Utilities/SdkGen/EdFi.SdkGen.Console/csharp | |
appsettings.Development.json | ||
|
||
*.log | ||
*.trx | ||
|
||
NugetPackages/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
// See the LICENSE and NOTICES files in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace EdFi.Ods.Common.Exceptions | ||
{ | ||
|
@@ -32,11 +31,5 @@ public ApiSecurityConfigurationException(string message) : base(message) | |
public ApiSecurityConfigurationException(string message, Exception inner) : base(message, inner) | ||
{ | ||
} | ||
|
||
protected ApiSecurityConfigurationException( | ||
SerializationInfo info, | ||
StreamingContext context) : base(info, context) | ||
{ | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an obsolete approach in .NET 8. |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything in this script that would require Windows instead of Ubuntu. Note: In the Admin API project, we publish NuGet packages to Azure Artifacts using Ubuntu.