Skip to content

Merge release-0.8.2 into main #56

Merge release-0.8.2 into main

Merge release-0.8.2 into main #56

Workflow file for this run

name: Build Distribution
on:
push:
branches: [main]
workflow_dispatch:
jobs:
test-unit:
name: Unit Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.13']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install backend dependencies
run: cd backend && uv pip install --system -e ".[dev]"
- name: Run backend tests
run: cd backend && pytest -v --tb=short
env:
SECRET_KEY: ci-test-secret-key-do-not-use-in-production
- name: Install frontend dependencies
if: matrix.python-version == '3.12'
run: cd frontend && npm ci
- name: Run frontend unit tests
if: matrix.python-version == '3.12'
run: cd frontend && npm run test:unit -- --run
build-offline:
name: Build Offline (${{ matrix.platform }})
runs-on: ubuntu-latest
needs: [test-unit]
permissions:
contents: read
strategy:
matrix:
platform: [linux, macos-arm64, macos-x86_64]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build distribution
run: bash scripts/build-mac-and-linux.sh ${{ matrix.platform }}
- name: Test install (dry-run)
run: bash scripts/test-install-mac-and-linux.sh ${{ matrix.platform }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: roboscope-offline-${{ matrix.platform }}
path: dist/roboscope_offline_${{ matrix.platform }}.zip
retention-days: 7
build-offline-windows:
name: Build Offline (Windows)
runs-on: windows-latest
needs: [test-unit]
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build distribution
run: powershell -ExecutionPolicy Bypass -File scripts/build-windows.ps1
- name: Test install (dry-run)
run: powershell -ExecutionPolicy Bypass -File scripts/test-install-windows.ps1
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: roboscope-offline-windows
path: dist/roboscope_offline_windows.zip
retention-days: 7
build-online:
name: Build (Online)
runs-on: ubuntu-latest
needs: [test-unit]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build distribution
run: bash scripts/build-online-mac-and-linux.sh
- name: Test online distribution
run: bash scripts/test-dist-mac-and-linux.sh online --skip-build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: roboscope-online
path: dist/roboscope.zip
retention-days: 7