Files
skillshare/.github/workflows/test.yaml
T
Willie f55e056fa4 feat: add comprehensive sandbox integration tests
Add complete integration test coverage for all CLI commands with
isolated sandbox environments that run on every change.

Changes:
- Add testutil package for sandbox test infrastructure
- Add 77 integration tests covering all commands (init, sync, status,
  diff, backup, restore, pull, doctor, target, version, help)
- Update CI workflow to run integration tests on Ubuntu and macOS
- Add SKILLSHARE_CONFIG env var support for test isolation
- Add mise.toml for task management
- Move scripts to scripts/ directory
2026-01-14 22:35:33 +08:00

50 lines
1006 B
YAML

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
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: go build -v ./...
- 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: |
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