Add CI tests, Windows installer cleanup, and streaming click-track rendering #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Installers | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| git_ref: | |
| description: Branch, tag, or commit SHA to build from | |
| required: false | |
| default: "" | |
| type: string | |
| workflow_call: | |
| inputs: | |
| git_ref: | |
| description: Branch, tag, or commit SHA to build from | |
| required: false | |
| default: "" | |
| type: string | |
| artifact_prefix: | |
| description: Optional prefix for uploaded artifact names | |
| required: false | |
| default: "" | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.git_ref || github.sha }} | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install . | |
| - name: Compile Python sources | |
| run: python -m compileall openbeat scripts tests | |
| - name: Run tests | |
| run: python -m unittest discover -s tests -v | |
| build: | |
| name: Build ${{ matrix.platform }} installer | |
| needs: test | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos | |
| runner: macos-latest | |
| artifact_path: dist/installers/*.pkg | |
| artifact_name: OpenBeat-macos-installer | |
| - platform: windows | |
| runner: windows-latest | |
| artifact_path: dist/installers/*installer.exe | |
| artifact_name: OpenBeat-windows-installer | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.git_ref || github.sha }} | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install . pyinstaller | |
| - name: Build installer bundle | |
| run: python scripts/build_installers.py --platform ${{ matrix.platform }} | |
| - name: Upload installer artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ inputs.artifact_prefix && format('{0}-{1}', inputs.artifact_prefix, matrix.artifact_name) || matrix.artifact_name }} | |
| path: ${{ matrix.artifact_path }} | |
| compression-level: 0 | |
| if-no-files-found: error |