Files
skillshare/.github/workflows/test.yaml
T
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.

Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
2026-02-08 05:08:30 +08:00

108 lines
2.4 KiB
YAML

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
jobs:
ui-embed-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
cache-dependency-path: ui/pnpm-lock.yaml
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build UI assets
run: make ui-build
- name: Verify embedded dist assets exist
run: |
test -f internal/server/dist/index.html
test -n "$(find internal/server/dist/assets -maxdepth 1 -type f | head -n 1)"
- name: Build binary with embedded UI
run: |
mkdir -p bin
go build -o bin/skillshare ./cmd/skillshare
unit-test:
runs-on: ubuntu-latest
needs: ui-embed-check
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build
run: go build -v ./...
- name: Unit Tests
run: go test -v -race ./internal/...
integration-test:
runs-on: ${{ matrix.os }}
needs: ui-embed-check
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: |
mkdir -p bin
go build -o bin/skillshare ./cmd/skillshare
- 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