mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Replace the embedded SPA (go:embed + build tags) with runtime download from GitHub Releases. The binary no longer bundles UI assets — they are downloaded on first `skillshare ui` launch and cached at ~/.cache/skillshare/ui/<version>/. - Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler - Simplify ensureUIAvailable(): cache check before dev-mode fallback - Pre-download UI assets in `skillshare upgrade` (best-effort) - Remove Node stages from production and CI Dockerfiles - Keep Node stage in sandbox for playground UI cache pre-population - Remove ui-embed-check CI job and -tags dev build flag - Update Makefile, mise.toml, GoReleaser, release workflow
68 lines
1.4 KiB
YAML
68 lines
1.4 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_call:
|
|
|
|
jobs:
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- name: Build
|
|
run: make build
|
|
|
|
- name: Unit Tests
|
|
run: go test -v -race ./internal/...
|
|
|
|
integration-test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- name: Build Binary
|
|
run: make build
|
|
|
|
- name: Integration Tests
|
|
run: go test -v -race ./tests/integration/...
|
|
env:
|
|
SKILLSHARE_TEST_BINARY: ${{ github.workspace }}/bin/skillshare
|
|
|
|
docker-sandbox-offline:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Docker Sandbox Tests (Offline)
|
|
run: ./scripts/test_docker.sh
|
|
|
|
docker-sandbox-online:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Docker Sandbox Tests (Online)
|
|
run: ./scripts/test_docker_online.sh
|