1
0
mirror of https://github.com/bia-technologies/yaxunit.git synced 2025-01-17 18:44:52 +02:00
yaxunit/.github/workflows/run-tests-windows.yml
2023-11-23 00:00:44 +03:00

125 lines
3.8 KiB
YAML

name: Run tests on Windows
on:
workflow_call:
inputs:
v8_version:
description: 'Platform version'
type: string
required: true
locale:
type: string
required: false
default: ru_RU
artifact_name:
type: string
required: false
default: build-artifacts
fail_on_failure:
type: boolean
required: false
default: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.v8_version }}-${{ inputs.locale }}-${{ github.event.number }}-Windows
cancel-in-progress: true
jobs:
execute-tests:
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: binary
- name: install platform
uses: alkoleft/onec-setup-build-env-action@develop
with:
type: onec
onec_version: ${{ inputs.v8_version }}
env:
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
timeout-minutes: 10
- name: create IB
run: |
mkdir data\data
ibcmd.exe infobase create --data=data --load=binary\configuration.cf --apply --force
timeout-minutes: 5
- name: load yaxunit
run: |
ibcmd.exe infobase config load --data=data --extension=YAXUNIT --force binary\yaxunit.cfe
ibcmd.exe infobase config apply --data=data --extension=YAXUNIT --force
ibcmd.exe infobase config extension update --data=data --name=YAXUNIT --safe-mode=no --unsafe-action-protection=no
timeout-minutes: 5
- name: load tests
run: |
ibcmd.exe infobase config load --data=data --extension=tests --force binary\tests.cfe
ibcmd.exe infobase config apply --data=data --extension=tests --force
ibcmd.exe infobase config extension update --data=data --name=tests --safe-mode=no --unsafe-action-protection=no
timeout-minutes: 5
- name: create test-config
uses: DamianReeves/write-file-action@master
with:
path: unit.json
contents: |
{
"reportFormat": "jUnit",
"reportPath": "reports\\report.xml",
"closeAfterTests": true,
"exitCode": "exit-code.txt",
"logging": {
"enable": false,
"console": true,
"file": "execute.log"
}
}
- uses: bhowell2/github-substring-action@1.0.2
id: short_locale
with:
value: ${{ inputs.locale }}
length_from_start: 2
- name: Test
run: |
Start-Process ibsrv.exe -ArgumentList "--data=data"
Start-Process -NoNewWindow -PassThru -Wait 1cv8c.exe -ArgumentList '/WS "http://localhost:8314" /C"RunUnitTests=unit.json" /L ${{ steps.short_locale.outputs.substring }} /VL ${{ inputs.locale }} /DisableStartupDialogs /DisableStartupMessages /DisableUnrecoverableErrorMessage /Out 1cv8c-output.log'
timeout-minutes: 10
# - name: view log
# if: always()
# run: type execute.log
- name: view output
if: always()
run: type 1cv8c-output.log
- name: upload-artifact
uses: actions/upload-artifact@v3
with:
name: Tests report. Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
path: reports/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
with:
job_name: Tests Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
check_name: Tests report. Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
report_paths: reports/report.xml
fail_on_failure: ${{ inputs.fail_on_failure }}
require_passed_tests: true