-
Notifications
You must be signed in to change notification settings - Fork 38
82 lines (73 loc) · 3.28 KB
/
Lib edFi.ods.standard pullrequest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Lib EdFi.Ods.Standard Pull request build and test
on:
pull_request:
branches: [main, 'ODS-*']
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
INFORMATIONAL_VERSION: "7.2"
BUILD_INCREMENTER: "1"
CONFIGURATION: "Release"
HEAD_REF: ${{ GITHUB.HEAD_REF }}
REF_NAME: ${{ GITHUB.REF_NAME }}
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }}
jobs:
FindStandardAndExtensionVersions:
uses: ./.github/workflows/Find Standard and Extension Versions.yml
with:
calling_branch: ${{ github.head_ref || github.ref_name }}
build:
if: ${{ always() }}
needs: FindStandardAndExtensionVersions
runs-on: ubuntu-latest
strategy:
matrix:
StandardVersion: ${{ fromJson(needs.FindStandardAndExtensionVersions.outputs.StandardVersions) }}
name: build (Standard ${{ matrix.StandardVersion }})
steps:
- name: Checkout Ed-Fi-ODS
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
path: Ed-Fi-ODS/
- 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/
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation"
- name: Cache Nuget packages
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 #v3.2.3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj*', '**/configuration.packages.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore NuGet packages
working-directory: ./Ed-Fi-ODS/
run: |
.\build.githubactions.ps1 restore -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Application/EdFi.Ods.Standard/EdFi.Ods.Standard.csproj"
shell: pwsh
- name: CodeGen
working-directory: ./Ed-Fi-ODS/
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$PSVersionTable
. $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1
Invoke-CodeGen -Engine SQLServer -RepositoryRoot $env:GITHUB_WORKSPACE -StandardVersion ${{ matrix.StandardVersion }}
- name: build
working-directory: ./Ed-Fi-ODS/
run: |
.\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Application/EdFi.Ods.Standard/EdFi.Ods.Standard.csproj" -StandardVersion ${{ matrix.StandardVersion }}
shell: pwsh
- name: Run Unit tests
working-directory: ./Ed-Fi-ODS/
run: |
.\build.githubactions.ps1 test -Configuration ${{ env.CONFIGURATION }} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Application/EdFi.Ods.Standard/EdFi.Ods.Standard.csproj"
shell: pwsh