|
41 | 41 | - name: Test |
42 | 42 | run: make test |
43 | 43 |
|
| 44 | + dashboard: |
| 45 | + name: Dashboard |
| 46 | + runs-on: ubuntu-latest |
| 47 | + if: ${{ !startsWith(github.head_ref, 'chore/sync-develop-after-') }} |
| 48 | + defaults: |
| 49 | + run: |
| 50 | + working-directory: dashboard |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - uses: actions/setup-node@v5 |
| 55 | + with: |
| 56 | + # Same Node as deploy/docker/Dockerfile and release.yml. |
| 57 | + node-version: "20" |
| 58 | + cache: npm |
| 59 | + cache-dependency-path: dashboard/package-lock.json |
| 60 | + |
| 61 | + - name: Install dependencies |
| 62 | + run: npm ci |
| 63 | + |
| 64 | + - name: Type check |
| 65 | + run: npx tsc -b |
| 66 | + |
| 67 | + - name: Test |
| 68 | + run: npm test |
| 69 | + |
| 70 | + # `make install` follows uv.lock. A merged PR can still fail |
| 71 | + # `pip install octop` when dependency ranges resolve differently in a clean |
| 72 | + # environment. Build the wheel, install it with pip, and verify the |
| 73 | + # published console command from an empty environment. |
| 74 | + command-install: |
| 75 | + name: Command install (${{ matrix.os }}) |
| 76 | + runs-on: ${{ matrix.os }} |
| 77 | + if: ${{ !startsWith(github.head_ref, 'chore/sync-develop-after-') }} |
| 78 | + strategy: |
| 79 | + fail-fast: false |
| 80 | + matrix: |
| 81 | + os: [ubuntu-latest, windows-latest] |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v4 |
| 84 | + |
| 85 | + - uses: astral-sh/setup-uv@v4 |
| 86 | + with: |
| 87 | + python-version: "3.12" |
| 88 | + |
| 89 | + - name: Build wheel |
| 90 | + run: uv build --wheel |
| 91 | + |
| 92 | + - name: Install the wheel with pip (Linux) |
| 93 | + if: runner.os == 'Linux' |
| 94 | + run: | |
| 95 | + set -euo pipefail |
| 96 | + uv venv --no-project --python 3.12 --seed /tmp/octop-install |
| 97 | + wheels=(dist/octop-*.whl) |
| 98 | + if [ "${#wheels[@]}" -ne 1 ]; then |
| 99 | + echo "expected one wheel, found: ${wheels[*]}" |
| 100 | + exit 1 |
| 101 | + fi |
| 102 | + /tmp/octop-install/bin/python -m pip install --upgrade pip |
| 103 | + /tmp/octop-install/bin/python -m pip install "${wheels[0]}" |
| 104 | +
|
| 105 | + - name: Install the wheel with pip (Windows) |
| 106 | + if: runner.os == 'Windows' |
| 107 | + shell: pwsh |
| 108 | + run: | |
| 109 | + $ErrorActionPreference = "Stop" |
| 110 | + uv venv --no-project --python 3.12 --seed .octop-install |
| 111 | + $wheels = @(Get-ChildItem -Path dist -Filter "octop-*.whl") |
| 112 | + if ($wheels.Count -ne 1) { |
| 113 | + throw "expected one wheel, found: $($wheels.Name -join ', ')" |
| 114 | + } |
| 115 | + .\.octop-install\Scripts\python.exe -m pip install --upgrade pip |
| 116 | + .\.octop-install\Scripts\python.exe -m pip install $wheels[0].FullName |
| 117 | +
|
| 118 | + - name: Verify the installed command (Linux) |
| 119 | + if: runner.os == 'Linux' |
| 120 | + run: /tmp/octop-install/bin/octop --help |
| 121 | + |
| 122 | + - name: Verify the installed command (Windows) |
| 123 | + if: runner.os == 'Windows' |
| 124 | + shell: pwsh |
| 125 | + run: .\.octop-install\Scripts\octop.exe --help |
| 126 | + |
44 | 127 | helm: |
45 | 128 | name: Helm chart |
46 | 129 | runs-on: ubuntu-latest |
|
0 commit comments