You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
actions-tests-setup/action.yml

130 lines
3.8 KiB
YAML

name: "Tests Setup"
description: ""
inputs:
github-token:
description: ''
default: ''
steam-appid:
description: ''
default: '261550'
steam-depotid:
description: ''
default: '261551'
steam-login:
description: ''
default: ''
steam-password:
description: ''
default: ''
steam-filefilter:
description: ''
default: './.github/resources/FileFilters.regexp'
stable-directory:
description: ''
default: 'bannerlord'
beta-directory:
description: ''
default: 'bannerlord-beta'
stable-version:
description: ''
default: ''
beta-version:
description: ''
default: ''
depotdownloader-version:
description: ''
default: '3.1.0'
opencover-version:
description: ''
default: '4.7.922'
runs:
using: "composite"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.x
- name: Setup .NET 5
uses: actions/setup-dotnet@v4
with:
dotnet-version: 5.x.x
- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x.x
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x.x
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Ensure NuGet Source
uses: fabriciomurta/ensure-nuget-source@v1
with:
name: 'nuget.org'
url: 'https://api.nuget.org/v3/index.json'
- name: Setup BUTR GPR
uses: actions/setup-dotnet@v4
with:
source-url: https://nuget.pkg.github.com/BUTR/index.json
env:
NUGET_AUTH_TOKEN: ${{inputs.github-token}}
- name: Download DepotDownloader_${{inputs.depotdownloader-version}}
id: download_depotdownloader
uses: robinraju/release-downloader@v1
with:
repository: SteamRE/DepotDownloader
tag: DepotDownloader_${{inputs.depotdownloader-version}}
fileName: DepotDownloader-windows-x64.zip
- name: Extract DepotDownloader_${{inputs.depotdownloader-version}}
uses: DuckSoft/extract-7z-action@v1.0
with:
pathSource: ${{fromJson(steps.download_depotdownloader.outputs.downloaded_files)[0]}}
pathTarget: depotdownloader
- name: Download Game Binaries (Stable)
run: >-
if ('${{inputs.stable-version}}' -eq '') { Return };
depotdownloader/DepotDownloader.exe -app ${{inputs.steam-appid}} -depot ${{inputs.steam-depotid}} -beta ${{inputs.stable-version}} -username ${{inputs.steam-login}}
-password ${{inputs.steam-password}} -os windows -osarch 64 -filelist ${{inputs.steam-filefilter}} -dir ${{inputs.stable-directory}};
shell: pwsh
- name: Download Game Binaries (Beta)
run: >-
if ('${{inputs.beta-version}}' -eq '') { Return };
depotdownloader/DepotDownloader.exe -app ${{inputs.steam-appid}} -depot ${{inputs.steam-depotid}} -beta ${{inputs.beta-version}} -username ${{inputs.steam-login}}
-password ${{inputs.steam-password}} -os windows -osarch 64 -filelist ${{inputs.steam-filefilter}} -dir ${{inputs.beta-directory}};
shell: pwsh
- name: Download opencover.${{inputs.opencover-version}}
id: download_opencover
uses: robinraju/release-downloader@v1
with:
repository: OpenCover/opencover
tag: ${{inputs.opencover-version}}
fileName: opencover.${{inputs.opencover-version}}.zip
- name: Extract opencover.${{inputs.opencover-version}}
run: Expand-Archive -Path "${{fromJson(steps.download_opencover.outputs.downloaded_files)[0]}}" -DestinationPath "${{github.workspace}}/opencover"
shell: pwsh