Test Next Minor #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ' Test Next Minor' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 15 * *' | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: powershell | |
env: | |
workflowDepth: 1 | |
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} | |
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} | |
jobs: | |
Initialization: | |
runs-on: [ windows-latest ] | |
outputs: | |
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | |
settings: ${{ steps.ReadSettings.outputs.SettingsJson }} | |
githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} | |
githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} | |
projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} | |
projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} | |
buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Initialize the workflow | |
id: init | |
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v3.1 | |
with: | |
shell: powershell | |
eventId: "DO0100" | |
- name: Read settings | |
id: ReadSettings | |
uses: microsoft/AL-Go-Actions/ReadSettings@v3.1 | |
with: | |
shell: powershell | |
parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} | |
- name: Determine Projects To Build | |
id: determineProjectsToBuild | |
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v3.1 | |
with: | |
shell: powershell | |
maxBuildDepth: ${{ env.workflowDepth }} | |
Build: | |
needs: [ Initialization ] | |
if: (!failure()) && (!cancelled()) && fromJson(needs.Initialization.outputs.buildOrderJson)[0].projectsCount > 0 | |
runs-on: ${{ fromJson(needs.Initialization.outputs.githubRunner) }} | |
defaults: | |
run: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
strategy: | |
matrix: | |
include: ${{ fromJson(needs.Initialization.outputs.buildOrderJson)[0].buildDimensions }} | |
fail-fast: false | |
name: Build ${{ matrix.project }} - ${{ matrix.buildMode }} | |
outputs: | |
TestResultsArtifactsName: ${{ steps.calculateArtifactNames.outputs.TestResultsArtifactsName }} | |
BcptTestResultsArtifactsName: ${{ steps.calculateArtifactNames.outputs.BcptTestResultsArtifactsName }} | |
BuildOutputArtifactsName: ${{ steps.calculateArtifactNames.outputs.BuildOutputArtifactsName }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Download thisbuild artifacts | |
if: env.workflowDepth > 1 | |
uses: actions/download-artifact@v3 | |
with: | |
path: '${{ github.workspace }}\.dependencies' | |
- name: Read settings | |
uses: microsoft/AL-Go-Actions/ReadSettings@v3.1 | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
project: ${{ matrix.project }} | |
- name: Read secrets | |
uses: microsoft/AL-Go-Actions/ReadSecrets@v3.1 | |
env: | |
secrets: ${{ toJson(secrets) }} | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
settingsJson: ${{ env.Settings }} | |
secrets: 'licenseFileUrl,insiderSasToken,codeSignCertificateUrl,codeSignCertificatePassword,keyVaultCertificateUrl,keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext' | |
- name: Determine ArtifactUrl | |
uses: microsoft/AL-Go-Actions/DetermineArtifactUrl@v3.1 | |
id: determineArtifactUrl | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
project: ${{ matrix.project }} | |
settingsJson: ${{ env.Settings }} | |
secretsJson: ${{ env.RepoSecrets }} | |
- name: Run pipeline | |
uses: microsoft/AL-Go-Actions/RunPipeline@v3.1 | |
env: | |
BuildMode: ${{ matrix.buildMode }} | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
project: ${{ matrix.project }} | |
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }} | |
settingsJson: ${{ env.Settings }} | |
secretsJson: ${{ env.RepoSecrets }} | |
buildMode: ${{ matrix.buildMode }} | |
- name: Calculate Artifact names | |
id: calculateArtifactsNames | |
uses: microsoft/AL-Go-Actions/CalculateArtifactNames@v3.1 | |
if: success() || failure() | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
settingsJson: ${{ env.Settings }} | |
project: ${{ matrix.project }} | |
buildMode: ${{ matrix.buildMode }} | |
branchName: ${{ github.ref_name }} | |
suffix: 'NextMinor' | |
- name: Upload thisbuild artifacts - apps | |
if: env.workflowDepth > 1 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildAppsArtifactsName }} | |
path: '${{ matrix.project }}/.buildartifacts/Apps/' | |
if-no-files-found: ignore | |
retention-days: 1 | |
- name: Upload thisbuild artifacts - test apps | |
if: env.workflowDepth > 1 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.calculateArtifactsNames.outputs.ThisBuildTestAppsArtifactsName }} | |
path: '${{ matrix.project }}/.buildartifacts/TestApps/' | |
if-no-files-found: ignore | |
retention-days: 1 | |
- name: Publish artifacts - build output | |
uses: actions/upload-artifact@v3 | |
if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',matrix.project)) != '') | |
with: | |
name: ${{ env.buildOutputArtifactsName }} | |
path: '${{ matrix.project }}/BuildOutput.txt' | |
if-no-files-found: ignore | |
- name: Publish artifacts - container event log | |
uses: actions/upload-artifact@v3 | |
if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',matrix.project)) != '') | |
with: | |
name: ${{ env.ContainerEventLogArtifactsName }} | |
path: '${{ matrix.project }}/ContainerEventLog.evtx' | |
if-no-files-found: ignore | |
- name: Publish artifacts - test results | |
uses: actions/upload-artifact@v3 | |
if: (success() || failure()) && (hashFiles(format('{0}/TestResults.xml',matrix.project)) != '') | |
with: | |
name: ${{ env.TestResultsArtifactsName }} | |
path: '${{ matrix.project }}/TestResults.xml' | |
if-no-files-found: ignore | |
- name: Publish artifacts - bcpt test results | |
uses: actions/upload-artifact@v3 | |
if: (success() || failure()) && (hashFiles(format('{0}/bcptTestResults.json',matrix.project)) != '') | |
with: | |
name: ${{ env.BcptTestResultsArtifactsName }} | |
path: '${{ matrix.project }}/bcptTestResults.json' | |
if-no-files-found: ignore | |
- name: Analyze Test Results | |
id: analyzeTestResults | |
if: success() || failure() | |
uses: microsoft/AL-Go-Actions/AnalyzeTests@v3.1 | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
Project: ${{ matrix.project }} | |
- name: Cleanup | |
if: always() | |
uses: microsoft/AL-Go-Actions/PipelineCleanup@v3.1 | |
with: | |
shell: ${{ needs.Initialization.outputs.githubRunnerShell }} | |
parentTelemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} | |
Project: ${{ matrix.project }} | |
PostProcess: | |
if: always() | |
runs-on: [ windows-latest ] | |
needs: [ Initialization, Build ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Finalize the workflow | |
id: PostProcess | |
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v3.1 | |
with: | |
shell: powershell | |
eventId: "DO0100" | |
telemetryScopeJson: ${{ needs.Initialization.outputs.telemetryScopeJson }} |