Merge pull request #136 from shinpr/chore/update-go-dependencies #388
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-matrix: | |
| name: Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| # actions/checkout@v6.0.3 | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| - name: Set up Go | |
| # actions/setup-go@v6.4.0 | |
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Check formatting | |
| if: runner.os == 'Linux' | |
| run: | | |
| test -z "$(gofmt -l $(git ls-files '*.go'))" | |
| - name: Test packages | |
| run: go test ./... | |
| - name: Build binaries | |
| run: | | |
| suffix="" | |
| if [ "$RUNNER_OS" = "Windows" ]; then | |
| suffix=".exe" | |
| fi | |
| go build -o "$RUNNER_TEMP/galley${suffix}" ./cmd/galley | |
| - name: Smoke install script on Windows Git Bash | |
| if: runner.os == 'Windows' | |
| run: | | |
| bin_dir="$(mktemp -d)" | |
| sh scripts/install.sh --local --bin-dir "$bin_dir" | |
| "$bin_dir/galley.exe" --help >/dev/null | |
| - name: Smoke install script on Windows PowerShell | |
| if: runner.os == 'Windows' && github.event_name == 'pull_request' | |
| shell: powershell | |
| run: | | |
| $binDir = Join-Path $env:RUNNER_TEMP "galley-ps-bin" | |
| powershell -NoProfile -ExecutionPolicy Bypass -File scripts/install.ps1 -Local -BinDir $binDir | |
| & (Join-Path $binDir "galley.exe") --help | Out-Null | |
| - name: Validate examples | |
| run: | | |
| repo_cwd="$(pwd)" | |
| if [ "$RUNNER_OS" = "Windows" ]; then | |
| repo_cwd="$(pwd -W)" | |
| fi | |
| tmp_task="$(mktemp)" | |
| sed "s#/Users/shinpr/Projects/galley#${repo_cwd}#" examples/afk-task.yaml > "$tmp_task" | |
| go run ./cmd/galley task validate "$tmp_task" | |
| go run ./cmd/galley profile validate --kind quality examples/quality-default.yaml | |
| go run ./cmd/galley profile validate --kind environment examples/environment-local.yaml | |
| go run ./cmd/galley schema check | |
| - name: Validate skill scripts | |
| run: | | |
| python_bin="python3" | |
| if ! command -v "$python_bin" >/dev/null 2>&1; then | |
| python_bin="python" | |
| fi | |
| "$python_bin" tests/plugins/galley/skills/galley/test_create_task_skeleton.py | |
| "$python_bin" tests/plugins/galley/skills/galley/test_update_task_executor.py | |
| - name: Validate JSON files | |
| run: | | |
| python_bin="python3" | |
| if ! command -v "$python_bin" >/dev/null 2>&1; then | |
| python_bin="python" | |
| fi | |
| "$python_bin" -m json.tool schemas/claude-result.schema.json >/dev/null | |
| "$python_bin" -m json.tool schemas/supervisor-verdict.schema.json >/dev/null | |
| "$python_bin" -m json.tool plugins/galley/skills/galley/references/task.schema.json >/dev/null | |
| "$python_bin" -m json.tool plugins/galley/skills/galley/references/quality.schema.json >/dev/null | |
| "$python_bin" -m json.tool plugins/galley/skills/galley/references/environment.schema.json >/dev/null | |
| "$python_bin" -m json.tool plugins/galley/.claude-plugin/plugin.json >/dev/null | |
| "$python_bin" -m json.tool plugins/galley/.codex-plugin/plugin.json >/dev/null | |
| "$python_bin" -m json.tool plugins/galley/plugin.json >/dev/null | |
| "$python_bin" -m json.tool .claude-plugin/marketplace.json >/dev/null | |
| "$python_bin" -m json.tool .grok-plugin/marketplace.json >/dev/null | |
| "$python_bin" -m json.tool .agents/plugins/marketplace.json >/dev/null | |
| - name: Smoke test | |
| if: runner.os != 'Windows' | |
| run: ./scripts/smoke-local.sh | |
| test: | |
| name: Test | |
| needs: test-matrix | |
| if: always() | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Verify OS test matrix succeeded | |
| if: needs.test-matrix.result != 'success' | |
| run: exit 1 |