Skip to content

Add CI validation for bin file executable permissions #362

Description

@groupsky

Problem

Currently, there are no automated tests that verify bin files have executable permissions after build. This creates a risk that the chmod +x commands in build scripts could be accidentally removed without detection.

Context

Proposed Solution

Add a CI validation step in .github/workflows/ci.yml after the build step:

- name: Validate bin file permissions
  run: |
    echo "Checking bin file permissions..."
    find packages/*/dist/*/bin -name "*.js" ! -name "*.map" | while read f; do
      if [ ! -x "$f" ]; then
        echo "❌ Not executable: $f"
        exit 1
      fi
    done
    echo "✅ All bin files are executable"

Benefits

  • Prevents regression where chmod is accidentally removed
  • Fast check (< 1 second)
  • No new dependencies needed
  • Protects all 4 CLI packages

Affected Packages

  • @ya-modbus/emulator
  • @ya-modbus/cli
  • @ya-modbus/device-profiler
  • @ya-modbus/mqtt-bridge

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciContinuous Integration improvementsenhancementNew feature or requestpriority:mediumMedium priorityscope:cliIssues related to the CLI packagescope:device-profilerIssues related to the device-profiler packagescope:emulatorIssues related to the emulator packagescope:mqtt-bridgeIssues related to the MQTT bridge packagetestingTesting improvements and additions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions