Skip to content

Prepare CC Branch for initial GitHub release #1

Prepare CC Branch for initial GitHub release

Prepare CC Branch for initial GitHub release #1

Workflow file for this run

name: CI
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
permissions:
contents: read
jobs:
python:
name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tmux
run: |
if [ "$RUNNER_OS" = "Linux" ]; then
sudo apt-get update
sudo apt-get install -y tmux
elif [ "$RUNNER_OS" = "macOS" ]; then
brew install tmux
fi
- name: Install Python package
env:
CC_BRANCH_SKIP_WEBUI_BUILD: "1"
run: |
python -m pip install --upgrade pip
python -m pip install -e .
- name: Run Python tests
run: python -m unittest discover tests
- name: Smoke test CLI
run: |
cc-branch --help
ccb --help
frontend:
name: Web UI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install web dependencies
working-directory: apps/web
run: npm install
- name: Lint web UI
working-directory: apps/web
run: npm run lint
- name: Test web UI
working-directory: apps/web
run: npm run test
- name: Build web UI
working-directory: apps/web
run: npm run build
package:
name: Python package
runs-on: ubuntu-latest
needs: [python, frontend]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install web dependencies
working-directory: apps/web
run: npm install
- name: Build bundled Web UI
run: python scripts/build-webui.py
- name: Build and check Python package
run: |
python -m pip install --upgrade pip
python -m pip install build twine
python -m build
twine check dist/*
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: python-dist
path: dist/*
desktop-sidecar:
name: Desktop sidecar script
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Validate sidecar build script
run: |
python -m py_compile cc_branch/desktop_backend.py scripts/build-desktop-sidecar.py packaging/desktop/cc_branch_backend.py
python scripts/build-desktop-sidecar.py --help