Skip to content

Build package once and test across all platforms#56

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/test-single-build-on-platforms
Draft

Build package once and test across all platforms#56
Copilot wants to merge 3 commits intomainfrom
copilot/test-single-build-on-platforms

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 27, 2026

When build_package: true, each matrix combination was building its own package variant. This meant different artifacts were tested on different platforms, and none matched what would eventually be released.

Changes

test.yml and sonar.yml workflows:

  • Split into two jobs: build-package (conditional, runs once on ubuntu-latest) and test (runs on full matrix)
  • build-package uploads artifact, test downloads it when build_package: true
  • test job uses needs: build-package with conditional if: !cancelled() && (needs.build-package.result == 'success' || needs.build-package.result == 'skipped') to run regardless of build-package execution

README.md:

  • Documented that build_package: true now builds once and tests the same artifact everywhere

Behavior

# Before: 3 OS × 3 versions = 9 different builds tested
# After: 1 build tested across 9 matrix combinations
jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        oscript_version: [default, stable, dev]
    uses: autumn-library/workflows/.github/workflows/test.yml@main
    with:
      build_package: true

When build_package: false (default), behavior is unchanged—no build step occurs.

Original prompt

This section details on the original issue you should resolve

<issue_title>Тестирование разных сборок на разных платформах вместо одной</issue_title>
<issue_description>Описание проблемы

Для workflow с input build_package: true сейчас собирается пакет отдельно на каждой ОС и версии OneScript из матрицы. Получается, что на каждой платформе тестируется своя собственная сборка.

Проблема

Тестируется не одна и та же сборка, которая в итоге будет опубликована в релиз, а разные версии.

Желаемое поведение

Должна быть одна сборка, которая тестируется на всех платформах и версиях OneScript из матрицы. Это позволит проверить, что конкретный собранный пакет работает везде.</issue_description>

<agent_instructions>Посмотри всю переписку в ишузе, а не только первое сообщение </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@nixel2007 Претензия в целом валидная, но...
  • Релизный воркфлоу не запускает тесты вообще, то есть в релиз уйдёт не тот же самый артефакт, что проходил тестирование
  • там жёстко зашита убунта, насколько я помню
@nixel2007 Звучит интересно, но надо посмотреть, как это можно уложить в один воркфлоу @nixel2007 Натравлю копилота

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 27, 2026 16:31
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix testing of a single build across platforms Build package once and test across all platforms Jan 27, 2026
Copilot AI requested a review from nixel2007 January 27, 2026 16:35
id: extract_oscript_version
run: |
set -ex
if [ "${{ inputs.oscript_version }}" = "default" ]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Всегда извлекать версию OneScript из манифеста

uses: actions/upload-artifact@v6
with:
name: package
path: ./*.ospx
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Возможно можно задать универсальный паттерн например

  .
  !.git/**
  !oscript_modules/**

Copy link
Copy Markdown
Contributor

@Stivo182 Stivo182 Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хотя указанный в inputs out-каталог действительно будет предпочтительней. Который будет передаваться в path

required: false

jobs:
build-package:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для сонара я думаю это излишне)

opm install opm
fi
opm install -l

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пропущена "Установка дополнительных пакетов"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Тестирование разных сборок на разных платформах вместо одной

3 participants