Skip to content

Commit

Permalink
.github/workflows/Generate-TestWorkflows.ps1: Use the latest version …
Browse files Browse the repository at this point in the history
…of each .NET SDK
  • Loading branch information
NightOwl888 committed Apr 30, 2024
1 parent dfe4f0e commit 170c60d
Show file tree
Hide file tree
Showing 37 changed files with 275 additions and 146 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/Generate-TestWorkflows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
.PARAMETER DotNet8SDKVersion
The SDK version of .NET 8.x to install on the build agent to be used for building and
testing. This SDK is always installed on the build agent. The default is 8.0.202.
testing. This SDK is always installed on the build agent. The default is 8.0.x.
.PARAMETER DotNet6SDKVersion
The SDK version of .NET 6.x to install on the build agent to be used for building and
testing. This SDK is always installed on the build agent. The default is 6.0.403.
testing. This SDK is always installed on the build agent. The default is 6.0.x.
.PARAMETER DotNet5SDKVersion
The SDK version of .NET 5.x to install on the build agent to be used for building and
testing. This SDK is always installed on the build agent. The default is 5.0.400.
testing. This SDK is always installed on the build agent. The default is 5.0.x.
#>
param(
[string]$OutputDirectory = $PSScriptRoot,
Expand All @@ -76,11 +76,11 @@ param(

[string[]]$Configurations = @('Release'),

[string]$DotNet8SDKVersion = '8.0.202',
[string]$DotNet8SDKVersion = '8.0.x',

[string]$DotNet6SDKVersion = '6.0.403',
[string]$DotNet6SDKVersion = '6.0.x',

[string]$DotNet5SDKVersion = '5.0.400'
[string]$DotNet5SDKVersion = '5.0.x'
)


Expand Down
129 changes: 129 additions & 0 deletions .github/workflows/Lucene - Backup-Net-Tests-Analysis-OpenNLP.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: 'Lucene - Backup.Net.Tests.Analysis.OpenNLP'

on:
workflow_dispatch:
pull_request:
paths:
- 'src/Lucene.Net.Tests.Analysis.OpenNLP/**/*'
- '.build/dependencies.props'
- '.build/TestReferences.Common.*'
- 'TestTargetFrameworks.*'
- '*.sln'
- 'src/Lucene.Net.Tests.Analysis.OpenNLP/Directory.Build.*'
- 'src/Directory.Build.*'
- 'Directory.Build.*'
- 'src/Lucene.Net.Tests.Analysis.OpenNLP/**/*.dict'
- 'src/Lucene.Net.Tests.Analysis.OpenNLP/**/*.bin'

# Dependencies
- 'src/Lucene.Net/**/*'
- 'src/Lucene.Net.Analysis.Common/**/*'
- 'src/Lucene.Net.Memory/**/*'
- 'src/Lucene.Net.Queries/**/*'
- 'src/Lucene.Net.Highlighter/**/*'
- 'src/dotnet/Lucene.Net.ICU/**/*'
- 'src/Lucene.Net.Analysis.OpenNLP/**/*'
- 'src/Lucene.Net.Codecs/**/*'
- 'src/Lucene.Net.TestFramework/**/*'

- '!**/*.md'

jobs:

Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
framework: [net48]
platform: [x64]
configuration: [Release]
exclude:
- os: ubuntu-latest
framework: net48
- os: ubuntu-latest
framework: net461
- os: macos-latest
framework: net48
- os: macos-latest
framework: net461
env:
project_path: './src/Lucene.Net.Tests.Analysis.OpenNLP/Lucene - Backup.Net.Tests.Analysis.OpenNLP.csproj'
run_slow_tests: 'false'
trx_file_name: 'TestResults.trx'
md_file_name: 'TestResults.md' # Report file name for LiquidTestReports.Markdown

steps:
- name: Checkout Source Code
uses: actions/checkout@v3

- name: Disable .NET SDK Telemetry and Logo
run: |
echo "DOTNET_NOLOGO=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
$project_name = [System.IO.Path]::GetFileNameWithoutExtension($env:project_path)
$test_results_artifact_name = "testresults_${{matrix.os}}_${{matrix.framework}}_${{matrix.platform}}_${{matrix.configuration}}"
$working_directory = "$env:GITHUB_WORKSPACE"
Write-Host "Project Name: $project_name"
Write-Host "Results Artifact Name: $test_results_artifact_name"
Write-Host "Working Directory: $working_directory"
echo "project_name=$project_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "test_results_artifact_name=$test_results_artifact_name" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Set the Azure DevOps default working directory env variable, so our tests only need to deal with a single env variable
echo "SYSTEM_DEFAULTWORKINGDIRECTORY=$working_directory" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Title for LiquidTestReports.Markdown
echo "title=Test Run for $project_name - ${{matrix.framework}} - ${{matrix.platform}} - ${{matrix.os}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- run: dotnet build ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} /p:TestFrameworks=true
- run: dotnet test ${{env.project_path}} --configuration ${{matrix.configuration}} --framework ${{matrix.framework}} --no-build --no-restore --blame-hang --blame-hang-dump-type mini --blame-hang-timeout 20minutes --logger:"console;verbosity=normal" --logger:"trx;LogFileName=${{env.trx_file_name}}" --logger:"liquid.md;LogFileName=${{env.md_file_name}};Title=${{env.title}};" --results-directory:"${{github.workspace}}/${{env.test_results_artifact_name}}/${{env.project_name}}" -- RunConfiguration.TargetPlatform=${{matrix.platform}} TestRunParameters.Parameter\(name=\"tests:slow\",\ value=\"\${{env.run_slow_tests}}\"\)
shell: bash
# upload reports as build artifacts
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
if: ${{always()}}
with:
name: '${{env.test_results_artifact_name}}'
path: '${{github.workspace}}/${{env.test_results_artifact_name}}'

8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-AllProjects.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -103,19 +103,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-Common.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -87,19 +87,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-Kuromoji.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -84,19 +84,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-Morfologik.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -84,19 +84,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-OpenNLP.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -87,19 +87,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-Phonetic.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -81,19 +81,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-SmartCn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -85,19 +85,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/Lucene-Net-Tests-Analysis-Stempel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
####################################################################################
####################################################################################
# DO NOT EDIT: This file was automatically generated by Generate-TestWorkflows.ps1
####################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -82,19 +82,19 @@ jobs:
- name: Setup .NET 5 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.400'
dotnet-version: '5.0.x'
if: ${{ startswith(matrix.framework, 'net5.') }}

- name: Setup .NET 6 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.403'
dotnet-version: '6.0.x'
if: ${{ startswith(matrix.framework, 'net6.') }}

- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.202'
dotnet-version: '8.0.x'

- name: Setup Environment Variables
run: |
Expand Down

0 comments on commit 170c60d

Please sign in to comment.