Skip to content

[ODS-6615] v7.1-patch4 release (#1224) #3128

[ODS-6615] v7.1-patch4 release (#1224)

[ODS-6615] v7.1-patch4 release (#1224) #3128

# 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: InitDev Postgres, Unit tests, Integration tests
run-name: ${{github.event.client_payload.branch}}
on:
pull_request:
branches: [main, b-v*-patch*]
push:
branches: [main, b-v*-patch*]
workflow_dispatch:
inputs:
distinct_id:
description: 'distinct ID for Trgr InitDev workflows in Implementation repo workflow'
required: false
default: 'distinct_id'
repository_dispatch:
types: [triggered-from-ods-repo]
env:
INFORMATIONAL_VERSION: "7.1"
BUILD_INCREMENTER: "1"
CONFIGURATION: "Release"
HEAD_REF: ${{ GITHUB.HEAD_REF }}
REF_NAME: ${{ GITHUB.REF_NAME }}
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }}
EDFI_SUITE_NUMBER: "Suite3"
msbuild_buildConfiguration: "release"
LANG: "en_US.utf8"
jobs:
FindStandardVersions:
runs-on: ubuntu-22.04
outputs:
StandardVersions: ${{ steps.Set_StandardVersions.outputs.StandardVersions }}
steps:
- name: Checkout Ed-Fi-ODS-Implementation
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
path: Ed-Fi-ODS-Implementation/
- name: Checkout Ed-Fi-ODS
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
path: Ed-Fi-ODS/
- name: Is pull request branch exists in Ed-Fi-ODS
working-directory: ./Ed-Fi-ODS-Implementation/
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS"
- name: Set StandardVersions
id: Set_StandardVersions
working-directory: ./Ed-Fi-ODS/
run: |
$output = .\build.githubactions.ps1 StandardVersions -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Application/EdFi.Ods.Standard/EdFi.Ods.Standard.csproj" | Out-String
echo "StandardVersions=$output" >> $env:GITHUB_OUTPUT
Write-host "StandardVersions is $output"
shell: pwsh
build:
if: ${{ always() }}
needs: FindStandardVersions
runs-on: ubuntu-22.04
strategy:
matrix:
StandardVersion: ${{ fromJson(needs.FindStandardVersions.outputs.StandardVersions) }}
name: build (Standard Version ${{ matrix.StandardVersion }})
services:
postgres:
image: postgres:13
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: echo distinct ID ${{ github.event.inputs.distinct_id }}
run: echo "${{ github.event.inputs.distinct_id }}"
- name: Setup .NET
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2
with:
dotnet-version: 6.0.x
- name: Checkout Ed-Fi-ODS-Implementation
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
path: Ed-Fi-ODS-Implementation/
- name: Is pull request branch exists in Ed-Fi-ODS-Implementation
working-directory: ./Ed-Fi-ODS-Implementation/
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "."
- name: Checkout Ed-Fi-ODS
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
path: Ed-Fi-ODS/
- name: Is pull request branch exists in Ed-Fi-ODS
working-directory: ./Ed-Fi-ODS-Implementation/
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS"
- name: Cache Nuget packages
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 #v4.0.1
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj*', '**/configuration.packages.json') }}
restore-keys: |
${{ runner.os }}-nuget-
${{ runner.os }}-
nuget-
enableCrossOsArchive: true
- name: Restore NuGet packages
working-directory: ./Ed-Fi-ODS-Implementation/
run: |
.\build.githubactions.ps1 restore -Solution "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/SdkGen/EdFi.SdkGen.sln"
.\build.githubactions.ps1 restore -Solution "$env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Application/Ed-Fi-Ods.sln"
shell: pwsh
- name: ODS/API InitDev, SdkGen,Run Integration Tests, Run Unit Tests
working-directory: ./Ed-Fi-ODS-Implementation/
run: |
$ErrorActionPreference = 'Stop'
[int]$BuildCounter = "${{ github.run_number }}"
[int]$BuildIncrementer = "${{ env.BUILD_INCREMENTER }}"
[int]$newRevision = $BuildCounter + $BuildIncrementer
[string]$version = "${{ env.INFORMATIONAL_VERSION}}"+ "." + $newRevision.ToString()
.\build.github.ps1 -Engine PostgreSQL -PackageVersion $version -RepositoryRoot $env:GITHUB_WORKSPACE -UsePlugins -RunSdkGen -GenerateApiSdkPackage -GenerateTestSdkPackage -RunPostman -RunPester -RunDotnetTest -NoPackaging -NoRestore -StandardVersion ${{ matrix.StandardVersion }}
shell: pwsh
- name: Upload Unit And Integration Test Reports
if: success() || failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6
with:
name: test-results-${{ matrix.StandardVersion }}
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/reports/
- name: Unit Test Report
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
if: success() || failure()
with:
name: Unit Tests
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/reports/*.trx
path-replace-backslashes: 'true'
working-directory: ${{ github.workspace }}/Ed-Fi-ODS-Implementation
reporter: dotnet-trx
- name: Postman Test Report
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1
if: success() || failure()
with:
name: Integration Tests
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/reports/*.xml
path-replace-backslashes: 'true'
working-directory: ${{ github.workspace }}/Ed-Fi-ODS-Implementation
reporter: java-junit
- name: Upload initdev logs
if: success() || failure()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6
with:
name: Initdev logs-${{ matrix.StandardVersion }}
path: |
${{ github.workspace }}/Ed-Fi-ODS-Implementation/Application/EdFi.Ods.Api.IntegrationTestHarness/bin/**/PostmanIntegrationTestsLog.log
${{ github.workspace }}/Ed-Fi-ODS-Implementation/Application/EdFi.Ods.Api.IntegrationTestHarness/bin/**/*TestHarnessLog.log