Skip to content
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

OSOE-518: Fix formatting of action/workflow files #170

Merged
merged 15 commits into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Add Azure Application Insights Release Annotation
description: >
Can be used to add release annotations in Azure Application Insights, to mark when a new version of an app was rolled
out to a given environment. See https://learn.microsoft.com/en-us/azure/azure-monitor/app/annotations for details.
Can be used to add release annotations in Azure Application Insights, to mark when a new version of an app was rolled
out to a given environment. See https://learn.microsoft.com/en-us/azure/azure-monitor/app/annotations for details.

inputs:
application-insights-resource-id:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ inputs:
required: false
default: "true"
description: >
If set to "true", Jira issue titles will be suffixed with "in <issue-component>" if the issue-component
parameter is specified, or the repository name. If set to "false", no suffix will be added to Jira issue titles.
If set to "true", Jira issue titles will be suffixed with "in <issue-component>" if the issue-component parameter
is specified, or the repository name. If set to "false", no suffix will be added to Jira issue titles.

runs:
using: "composite"
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/msbuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ inputs:
required: false
default: ""
description: >
Additional command line switches given to `msbuild`. You must split these into multiple lines, even the
parameter value.
Additional command line switches given to `msbuild`. You must split these into multiple lines, even the parameter
value.
solution-or-project-path:
required: false
default: "*.sln"
Expand Down
32 changes: 16 additions & 16 deletions .github/actions/publish-nuget/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
source:
required: false
default: https://api.nuget.org/v3/index.json
description: The NuGet server URL used by the `dotnet nuget push` command's `--source` argument.
description: The NuGet server URL used by the `dotnet nuget push` command's `--source` argument.
verbosity:
required: false
default: minimal
Expand All @@ -14,8 +14,8 @@ inputs:
required: false
default: ""
description: >
Additional warning codes for the `-p:NoWarn=` argument of `dotnet pack`. The items can be
separated by any whitespace, including newlines.
Additional warning codes for the `-p:NoWarn=` argument of `dotnet pack`. The items can be separated by any
whitespace, including newlines.
dotnet-pack-include-symbols:
required: false
default: "true"
Expand Down Expand Up @@ -62,17 +62,17 @@ runs:

if ($version -eq 'USE_GITHUB_REF_NAME') { $version = $Env:GITHUB_REF_NAME.Trim().TrimStart("v") }
if ($version -eq 'USE_GITHUB_RUN_NUMBER') {
$tags = git tag |
? { $_ -match '^v?\d+(\.\d+){0,3}$' } |
% { [version]($_.TrimStart("v")) } |
$tags = git tag |
? { $_ -match '^v?\d+(\.\d+){0,3}$' } |
% { [version]($_.TrimStart("v")) } |
Sort-Object -Descending
$current = if ($tags.Count -gt 0) { $tags[0] } else { [version]"0.0.0" }

$next = New-Object "System.Version" $current.Major, $current.Minor, ($current.Build + 1)

$version = "$next-preview-$Env:GITHUB_RUN_NUMBER"
}

Write-Output "Target Version: $version"
Set-GitHubOutput "publish-version" $version

Expand Down Expand Up @@ -116,15 +116,15 @@ runs:
# solution, or fail if there are multiple projects".
solution-or-project-path: ""
dotnet-build-switches: |
--no-restore
-p:NuGetBuild=true
-p:LangVersion=Latest
-p:GenerateDocumentationFile=True
-p:NoWarn=CS1573%3BCS1591%3BVSTHRD002%3BVSTHRD200
-p:EnableNETAnalyzers=false
-p:ContinuousIntegrationBuild=true
-p:DebugSymbols=true
-p:DebugType=portable
--no-restore
-p:NuGetBuild=true
-p:LangVersion=Latest
-p:GenerateDocumentationFile=True
-p:NoWarn=CS1573%3BCS1591%3BVSTHRD002%3BVSTHRD200
-p:EnableNETAnalyzers=false
-p:ContinuousIntegrationBuild=true
-p:DebugSymbols=true
-p:DebugType=portable

- name: Actions prior to dotnet pack
if: hashFiles('Invoke-BeforePack.ps1')
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/spelling/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ description: Checks for spelling errors in files.
inputs:
dictionary-source-prefixes:
# When v0.0.21 is out update this and the one in spelling.yml with the version below.
description: JSON map of prefixes for dictionary urls, "cspell" is necessary. See https://github.com/check-spelling/check-spelling/blob/86a22cfaff3846dbd788acea5d18cf5db6d40dd1/action.yml#L64 for current version.
description: >
JSON map of prefixes for dictionary urls, "cspell" is necessary. See
https://github.com/check-spelling/check-spelling/blob/86a22cfaff3846dbd788acea5d18cf5db6d40dd1/action.yml#L64 for
current version.
required: false
default: '{"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20220816/dictionaries/"}'
extra-dictionaries:
Expand Down
11 changes: 6 additions & 5 deletions .github/actions/test-dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ inputs:
test-filter:
required: false
description: >
Filter expression for dotnet test. See: https://learn.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests.
Filter expression for dotnet test. See:
https://learn.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests.
test-configuration:
required: false
description: Value passed to the --configuration parameter of dotnet test.
Expand Down Expand Up @@ -62,7 +63,7 @@ runs:
shell: pwsh
run: |
Initialize-ArtifactNameSuffix '${{ inputs.build-directory }}'

Set-XUnitMaxParallelThreads -MaxParallelThreads ${{ inputs.xunit-max-parallel-threads }}

if (${{ inputs.ui-test-parallelism }} -eq -1)
Expand Down Expand Up @@ -114,7 +115,7 @@ runs:
if: (success() || failure()) && steps.run-tests.outputs.test-count != 0
with:
name: Test Results (${{inputs.build-directory}}|${{ steps.setup.outputs.runner-suffix }}
path: '${{inputs.build-directory}}/**/*.trx'
path: "${{inputs.build-directory}}/**/*.trx"
reporter: dotnet-trx
fail-on-error: 'false'
output-to: 'step-summary'
fail-on-error: "false"
output-to: "step-summary"
2 changes: 1 addition & 1 deletion .github/actions/verify-submodule-pull-request/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Verify Submodule Pull Request
description: >
Assuming that the current repository is a submodule in another repository, this action verifies that a pull request
Assuming that the current repository is a submodule in another repository, this action verifies that a pull request
with a matching issue code has been opened there as well.

inputs:
Expand Down
97 changes: 49 additions & 48 deletions .github/workflows/build-and-test-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ on:
required: false
type: string
default: "true"
# This needs to be stringified JSON because inputs don't support arrays, see
# This needs to be stringified JSON because inputs don't support arrays, see
# https://github.saobby.my.eu.orgmunity/t/reusable-workflow-with-strategy-matrix/205676/2.
machine-types:
required: false
type: string
default: "['ubuntu-22.04']"
description: >
Stringified JSON array with the name of the type of machine(s) to run the workflow under, e.g.
"['ubuntu-22.04']" or "['ubuntu-22.04\", \"windows-2022']".
Stringified JSON array with the name of the type of machine(s) to run the workflow under, e.g.
"['ubuntu-22.04']" or "['ubuntu-22.04', 'windows-2022']".
dotnet-version:
required: false
type: string
Expand Down Expand Up @@ -75,9 +75,10 @@ on:
type: string
default: "0"
description: >
Change this to any other value to alter the cache key, effectively invalidating the latest cache. This is the
only current way to force "clear" the cache (https://github.saobby.my.eu.orgmunity/t/how-to-clear-cache-in-github-actions/129038/5)
until the associated issue (https://github.com/actions/cache/issues/2) is resolved.
Change this to any other value to alter the cache key, effectively invalidating the latest cache. This is the
only current way to force "clear" the cache
(https://github.saobby.my.eu.orgmunity/t/how-to-clear-cache-in-github-actions/129038/5) until the associated issue
(https://github.com/actions/cache/issues/2) is resolved.
build-create-binary-log:
required: false
type: string
Expand Down Expand Up @@ -119,7 +120,7 @@ on:
required: false
type: boolean
default: true
description: >
description: >
When set to true, it will be verified whether the NuGet packages of the .NET solution are consolidated, i.e.
the same version of a given package is used in all projects.

Expand All @@ -136,51 +137,51 @@ jobs:
matrix:
machine-type: ${{ fromJson(inputs.machine-types) }}
timeout-minutes:
- ${{ inputs.timeout-minutes }}
- ${{ inputs.timeout-minutes }}
timeout-minutes: ${{ matrix.timeout-minutes }}
steps:
- name: Checkout
uses: Lombiq/GitHub-Actions/.github/actions/checkout@dev
with:
token: ${{ secrets.CHECKOUT_TOKEN }}
- name: Checkout
uses: Lombiq/GitHub-Actions/.github/actions/checkout@dev
with:
token: ${{ secrets.CHECKOUT_TOKEN }}

- name: Set up .NET
uses: Lombiq/GitHub-Actions/.github/actions/setup-dotnet@dev
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Set up .NET
uses: Lombiq/GitHub-Actions/.github/actions/setup-dotnet@dev
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: Verify that .NET packages are consolidated
if: ${{ inputs.verify-dotnet-consolidation }}
uses: Lombiq/GitHub-Actions/.github/actions/verify-dotnet-consolidation@dev
with:
directory: ${{ inputs.build-directory }}
- name: Verify that .NET packages are consolidated
if: ${{ inputs.verify-dotnet-consolidation }}
uses: Lombiq/GitHub-Actions/.github/actions/verify-dotnet-consolidation@dev
with:
directory: ${{ inputs.build-directory }}

- name: Build and Static Code Analysis
uses: Lombiq/GitHub-Actions/.github/actions/build-dotnet@dev
with:
directory: ${{ inputs.build-directory}}
configuration: ${{ inputs.build-configuration}}
verbosity: ${{ inputs.build-verbosity}}
enable-code-analysis: ${{ inputs.build-enable-code-analysis}}
enable-nuget-caching: ${{ inputs.build-enable-nuget-caching }}
enable-npm-caching: ${{ inputs.build-enable-npm-caching }}
cache-version: ${{ inputs.build-cache-version }}
solution-or-project-path: ${{ inputs.build-solution-path }}
create-binary-log: ${{ inputs.build-create-binary-log }}
binary-log-artifact-retention-days: ${{ inputs.build-binary-log-artifact-retention-days }}
- name: Build and Static Code Analysis
uses: Lombiq/GitHub-Actions/.github/actions/build-dotnet@dev
with:
directory: ${{ inputs.build-directory}}
configuration: ${{ inputs.build-configuration}}
verbosity: ${{ inputs.build-verbosity}}
enable-code-analysis: ${{ inputs.build-enable-code-analysis}}
enable-nuget-caching: ${{ inputs.build-enable-nuget-caching }}
enable-npm-caching: ${{ inputs.build-enable-npm-caching }}
cache-version: ${{ inputs.build-cache-version }}
solution-or-project-path: ${{ inputs.build-solution-path }}
create-binary-log: ${{ inputs.build-create-binary-log }}
binary-log-artifact-retention-days: ${{ inputs.build-binary-log-artifact-retention-days }}

- name: Tests
if: inputs.test-disable == 'false'
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@dev
with:
build-directory: ${{ inputs.build-directory }}
solution-path: ${{ inputs.build-solution-path }}
test-verbosity: ${{ inputs.build-verbosity }}
test-filter: ${{ inputs.test-filter }}
xunit-max-parallel-threads: ${{ inputs.xunit-max-parallel-threads }}
- name: Tests
if: inputs.test-disable == 'false'
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@dev
with:
build-directory: ${{ inputs.build-directory }}
solution-path: ${{ inputs.build-solution-path }}
test-verbosity: ${{ inputs.build-verbosity }}
test-filter: ${{ inputs.test-filter }}
xunit-max-parallel-threads: ${{ inputs.xunit-max-parallel-threads }}

- name: Cancel Workflow on Failure
if: failure() && inputs.cancel-workflow-on-failure == 'true'
uses: Lombiq/GitHub-Actions/.github/actions/cancel-workflow@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cancel Workflow on Failure
if: failure() && inputs.cancel-workflow-on-failure == 'true'
uses: Lombiq/GitHub-Actions/.github/actions/cancel-workflow@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 9 additions & 9 deletions .github/workflows/build-and-test-orchard-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,26 @@ jobs:
timeout-minutes: ${{ matrix.timeout-minutes }}
steps:
- name: Checkout
uses: Lombiq/GitHub-Actions/.github/actions/checkout@dev
uses: Lombiq/GitHub-Actions/.github/actions/checkout@issue/OSOE-518
with:
token: ${{ secrets.CHECKOUT_TOKEN }}

- name: Set up .NET
uses: Lombiq/GitHub-Actions/.github/actions/setup-dotnet@dev
uses: Lombiq/GitHub-Actions/.github/actions/setup-dotnet@issue/OSOE-518
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: Verify that .NET packages are consolidated
if: ${{ inputs.verify-dotnet-consolidation }}
uses: Lombiq/GitHub-Actions/.github/actions/verify-dotnet-consolidation@dev
uses: Lombiq/GitHub-Actions/.github/actions/verify-dotnet-consolidation@issue/OSOE-518
with:
directory: ${{ inputs.build-directory }}

- name: Enable Node corepack
uses: Lombiq/GitHub-Actions/.github/actions/enable-corepack@dev
uses: Lombiq/GitHub-Actions/.github/actions/enable-corepack@issue/OSOE-518

- name: Build and Static Code Analysis
uses: Lombiq/GitHub-Actions/.github/actions/build-dotnet@dev
uses: Lombiq/GitHub-Actions/.github/actions/build-dotnet@issue/OSOE-518
with:
directory: ${{ inputs.build-directory }}
configuration: ${{ inputs.build-configuration}}
Expand All @@ -202,17 +202,17 @@ jobs:

- name: Set up SQL Server
if: inputs.set-up-sql-server == 'true'
uses: Lombiq/GitHub-Actions/.github/actions/setup-sql-server@dev
uses: Lombiq/GitHub-Actions/.github/actions/setup-sql-server@issue/OSOE-518

- name: Set up Azurite
if: inputs.set-up-azurite == 'true'
uses: Lombiq/GitHub-Actions/.github/actions/setup-azurite@dev
uses: Lombiq/GitHub-Actions/.github/actions/setup-azurite@issue/OSOE-518
with:
location: ${{ inputs.build-directory}}

- name: Tests
if: inputs.test-disable == 'false'
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@dev
uses: Lombiq/GitHub-Actions/.github/actions/test-dotnet@issue/OSOE-518
with:
build-directory: ${{ inputs.build-directory }}
solution-path: ${{ inputs.build-solution-path }}
Expand All @@ -224,6 +224,6 @@ jobs:

- name: Cancel Workflow on Failure
if: failure() && inputs.cancel-workflow-on-failure == 'true'
uses: Lombiq/GitHub-Actions/.github/actions/cancel-workflow@dev
uses: Lombiq/GitHub-Actions/.github/actions/cancel-workflow@issue/OSOE-518
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading