* Installer: restore interrupted updates and clean stale rollback environments * CI: run POSIX rollback lifecycle tests on Linux
78 lines
2.7 KiB
YAML
78 lines
2.7 KiB
YAML
# SPDX-License-Identifier: AGPL-3.0-only
|
|
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved.
|
|
|
|
# Runs installer parity and autostart opt-out tests across all three platforms.
|
|
#
|
|
# Why: the parity test guards that install.sh and install.ps1 stay in sync.
|
|
# It originally ran only on ubuntu-latest through studio-backend-ci.yml.
|
|
# On Windows, Path.read_text() defaults to the cp1252 locale encoding, so a
|
|
# non-cp1252 byte in install.sh raises UnicodeDecodeError even though Linux
|
|
# and macOS default to UTF-8. The reads were pinned to encoding="utf-8" in
|
|
# #6166; this matrix keeps that from silently regressing. Pure pytest, no GPU,
|
|
# sub-second, so the matrix is cheap. Linux also runs the POSIX rollback test
|
|
# under dash, matching the supported curl-to-sh installer path.
|
|
|
|
name: Cross-platform parity
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'install.sh'
|
|
- 'install.ps1'
|
|
- 'tests/test_installer_skip_autostart.py'
|
|
- 'tests/python/test_cross_platform_parity.py'
|
|
- 'tests/sh/test_install_rollback_lifecycle.sh'
|
|
- 'tests/studio/test_install_rollback_lifecycle.ps1'
|
|
- '.github/workflows/cross-platform-parity-ci.yml'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'install.sh'
|
|
- 'install.ps1'
|
|
- 'tests/test_installer_skip_autostart.py'
|
|
- 'tests/python/test_cross_platform_parity.py'
|
|
- 'tests/sh/test_install_rollback_lifecycle.sh'
|
|
- 'tests/studio/test_install_rollback_lifecycle.ps1'
|
|
- '.github/workflows/cross-platform-parity-ci.yml'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
parity:
|
|
name: parity (${{ matrix.os }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: '3.12'
|
|
cache: 'pip'
|
|
- run: python -m pip install -U pip pytest
|
|
- name: Cross-platform parity tests
|
|
env:
|
|
UNSLOTH_NO_TORCH: '1'
|
|
run: >-
|
|
python -m pytest
|
|
tests/python/test_cross_platform_parity.py
|
|
tests/test_installer_skip_autostart.py
|
|
-q
|
|
- name: PowerShell rollback lifecycle tests
|
|
if: runner.os == 'Windows'
|
|
shell: pwsh
|
|
run: pwsh -NoProfile -File tests/studio/test_install_rollback_lifecycle.ps1
|
|
- name: POSIX rollback lifecycle tests
|
|
if: runner.os == 'Linux'
|
|
run: sh tests/sh/test_install_rollback_lifecycle.sh
|