mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-16 15:32:09 +00:00
Fix unit-test segfault on missing shipped profile in sparse CI checkout
The Unit Tests job sparse-checks-out only .github/scripts/tests, so the baked-in absolute PROFILES_DIR was missing at runtime; the shipped-profile test then read a non-existent JSON and null-dereferenced in opt_string. Check out resources/ in the unit-test job, and guard the test helper to skip when the profile is absent and require the key before dereferencing.
This commit is contained in:
6
.github/workflows/unit_tests.yml
vendored
6
.github/workflows/unit_tests.yml
vendored
@@ -28,11 +28,15 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
# tests/data is referenced by absolute path (TEST_DATA_DIR).
|
||||
# Tests reach outside tests/ at runtime: tests/data (TEST_DATA_DIR) and
|
||||
# resources/profiles (PROFILES_DIR) by baked-in absolute path, plus
|
||||
# resources/info (nozzle data) via resources_dir() during a real slice.
|
||||
# Check out all of resources/ so no test hits a missing-file path.
|
||||
sparse-checkout: |
|
||||
.github
|
||||
scripts
|
||||
tests
|
||||
resources
|
||||
- name: Apt-Install Dependencies
|
||||
if: runner.os == 'Linux' && !vars.SELF_HOSTED
|
||||
uses: ./.github/actions/apt-install-deps
|
||||
|
||||
Reference in New Issue
Block a user