Skip to content

Commit

Permalink
Pull request worfklow for code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenfuqua committed Jan 24, 2024
1 parent 734f651 commit 2efa291
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/.editorconfig
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
66 changes: 66 additions & 0 deletions .github/workflows/edfi.codegen pullrequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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/**/*

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: 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: Ensure pull request 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: 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 Test Results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: unit-tests
path: ./Ed-Fi-ODS/utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/TestResults/unit-tests.trx
retention-days: 5

- name: Run unit tests
working-directory: ./Ed-Fi-ODS/utilities/CodeGeneration
run: |
dotnet test --filter FullyQualifiedName~IntegrationTests --logger "trx;LogFileName=integration-tests.trx" --logger "console;verbosity=detailed"
- name: Upload Test Results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: integration-tests
path: ./Ed-Fi-ODS/utilities/CodeGeneration/EdFi.Ods.CodeGen.Tests/TestResults/integration-tests.trx
retention-days: 5

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@ Utilities/SdkGen/EdFi.SdkGen.Console/csharp
appsettings.Development.json

*.log
*.trx

NugetPackages/
4 changes: 2 additions & 2 deletions Utilities/CodeGeneration/EdFi.Ods.CodeGen.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29609.76
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 16.0.0.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdFi.Ods.CodeGen", "EdFi.Ods.CodeGen\EdFi.Ods.CodeGen.csproj", "{CA26E530-3F39-4314-AA73-60C99DB7661B}"
EndProject
Expand Down

0 comments on commit 2efa291

Please sign in to comment.