Run tests in CI

This commit is contained in:
WarmUpTill 2024-02-24 15:31:49 +01:00 committed by WarmUpTill
parent fb7bcd57cd
commit ecfd177d78
2 changed files with 48 additions and 2 deletions

37
.github/actions/run-tests/action.yaml vendored Normal file
View File

@ -0,0 +1,37 @@
name: "Run tests"
description: "Run tests."
inputs:
target:
description: "Build target"
required: true
workingDirectory:
description: "Working directory"
required: false
default: ${{ github.workspace }}
runs:
using: "composite"
steps:
- name: Run macOS tests
if: ${{ runner.os == 'macOS' }}
shell: zsh {0}
run: |
if [[ '${{ inputs.target }}' != 'macos-universal' ]]; then
echo tests skipped!
exit 0
fi
${{ inputs.workingDirectory }}/build_macos/tests/advanced-scene-switcher-tests
- name: Run Linux packaging
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
if [[ '${{ inputs.target }}' != 'x86_64' ]]; then
exit 0
fi
${{ inputs.workingDirectory }}/build_x86_64/tests/advanced-scene-switcher-tests
- name: Run Windows packaging
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
${{ inputs.workingDirectory }}/build_x64/tests/RelWithDebInfo/advanced-scene-switcher-tests.exe

View File

@ -3,7 +3,7 @@ on:
workflow_call:
outputs:
pluginName:
description: 'Project name detected by parsing build spec file'
description: "Project name detected by parsing build spec file"
value: ${{ jobs.check-event.outputs.pluginName }}
env:
DEP_DIR: .deps/advss-build-dependencies
@ -110,7 +110,6 @@ jobs:
print '::group::Select Xcode version'
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
print '::endgroup::'
- uses: actions/cache@v4
id: ccache-cache
@ -220,6 +219,11 @@ jobs:
target: x86_64
config: ${{ needs.check-event.outputs.config }}
- name: Run tests
uses: ./.github/actions/run-tests
with:
target: x86_64
- name: Package Plugin 📀
uses: ./.github/actions/package-plugin
with:
@ -287,6 +291,11 @@ jobs:
target: x64
config: ${{ needs.check-event.outputs.config }}
- name: Run tests
uses: ./.github/actions/run-tests
with:
target: x64
- name: Package Plugin 📀
uses: ./.github/actions/package-plugin
with: