1
0
mirror of https://github.com/bia-technologies/yaxunit.git synced 2025-03-17 20:48:01 +02:00

ci optimize

This commit is contained in:
alkoleft 2024-05-20 15:54:55 +03:00
parent 8a207fbfbc
commit c30d0b72b0
7 changed files with 117 additions and 34 deletions

View File

@ -1,7 +1,11 @@
name: Build and test
on:
push:
branches: [ feature/**, develop ]
branches:
- feature/**
- develop
tags:
- '*'
pull_request_target:
branches: [ develop ]
@ -10,14 +14,14 @@ concurrency:
cancel-in-progress: true
permissions:
contents: read
contents: write
checks: write
id-token: write
jobs:
export_to_designer:
name: Export to designer xml
uses: ./.github/workflows/export-xml.yml
uses: ./.github/workflows/step-export-xml.yml
with:
edt_version: 2023.1.2
artifact_name: designer-src
@ -25,44 +29,46 @@ jobs:
build_artifacts:
name: Build artifacts
uses: ./.github/workflows/build-on-windows.yml
uses: ./.github/workflows/step-build-artifacts-windows.yml
needs: export_to_designer
with:
v8_version: 8.3.21.1895
secrets: inherit
tests_linux_ru:
name: Tests Linux 8.3.21.1895 ru_RU
uses: ./.github/workflows/run-tests-linux.yml
if: github.ref == 'refs/heads/develop'
tests_windows:
strategy:
fail-fast: false
matrix:
v8_version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-windows.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
v8_version: ${{ matrix.v8_version }}
locale: ${{ matrix.locale }}
secrets: inherit
tests_linux_en:
name: Tests Linux 8.3.21.1895 en_US
uses: ./.github/workflows/run-tests-linux.yml
if: github.ref == 'refs/heads/develop'
tests_linux:
strategy:
fail-fast: false
matrix:
v8_version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-linux.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
locale: en_US
v8_version: ${{ matrix.v8_version }}
locale: ${{ matrix.locale }}
secrets: inherit
tests_windows_ru:
name: Tests Windows 8.3.21.1895 ru_RU
uses: ./.github/workflows/run-tests-windows.yml
publish_artifacts:
name: Publish draft release
if: ${{ startsWith(github.ref, 'refs/tags/') && success() }}
uses: ./.github/workflows/step-publish-artifacts.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
locale: ru_RU
secrets: inherit
tests_windows_en:
name: Tests Windows 8.3.21.1895 en_US
uses: ./.github/workflows/run-tests-windows.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
locale: en_US
secrets: inherit

View File

@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: true
jobs:
build:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

View File

@ -0,0 +1,35 @@
name: Run tests on Linux
on:
workflow_call:
inputs:
artifact_name:
type: string
required: false
default: build-artifacts
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: binary
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: binary/YAxUnit.cfe
generate_release_notes: true
append_body: false
token: ${{ secrets.GITHUB_TOKEN }}

42
.github/workflows/step-run-tests.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Run tests on Linux
on:
workflow_call:
inputs:
matrix:
description: 'Matrix parameters'
type: string
required: true
artifact_name:
type: string
required: false
default: build-artifacts
fail_on_failure:
type: boolean
required: false
default: true
permissions:
contents: read
checks: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
tests_windows:
uses: ./.github/workflows/step-run-tests-windows.yml
with:
matrix: ${{ inputs.matrix }}
secrets: inherit
tests_ubuntu:
uses: ./.github/workflows/step-run-tests-linux.yml
with:
matrix: ${{ inputs.matrix }}
secrets: inherit