|
1 | | -# Gitpod workspace configuration for the local repository. |
2 | | -# This file creates a repeatable cloud development environment. |
3 | | -# It ensures dependencies are installed and the codebase is vetted |
4 | | -# and tested on workspace start. |
| 1 | +# Gitpod workspace configuration for go-subtree |
| 2 | +# Uses magex for build automation and development tasks |
| 3 | +# This creates a one-click development environment for contributors |
5 | 4 |
|
6 | | -image: |
7 | | - name: gitpod/workspace-full:1.0.0 |
| 5 | +image: gitpod/workspace-go:latest |
8 | 6 |
|
9 | 7 | tasks: |
10 | 8 | - name: setup-and-test |
11 | 9 | init: | |
12 | | - echo "Downloading Go modules..." |
13 | | - go mod download |
14 | | - go mod tidy |
15 | | - # Install goimports if not present |
16 | | - if ! command -v goimports >/dev/null; then |
17 | | - go install golang.org/x/tools/cmd/goimports@latest |
18 | | - fi |
19 | | - go fmt ./... |
20 | | - goimports -w . |
21 | | - golangci-lint run |
22 | | - go vet ./... |
| 10 | + echo "🚀 Setting up go-subtree development environment..." |
| 11 | + echo "📦 Installing MAGE-X build tool..." |
| 12 | + go install github.com/mrz1836/mage-x/cmd/magex@latest |
| 13 | +
|
| 14 | + echo "📥 Downloading dependencies..." |
| 15 | + magex deps:download |
| 16 | +
|
| 17 | + echo "🔧 Initial build..." |
| 18 | + magex build |
| 19 | +
|
| 20 | + echo "✅ Running initial tests..." |
| 21 | + magex test |
| 22 | +
|
23 | 23 | command: | |
24 | | - go test ./... |
| 24 | + echo "===============================================" |
| 25 | + echo "🎯 Welcome to go-subtree development!" |
| 26 | + echo "===============================================" |
| 27 | + echo "" |
| 28 | + echo "🛠️ Available magex commands:" |
| 29 | + echo " magex test - Run all tests" |
| 30 | + echo " magex lint - Run linters" |
| 31 | + echo " magex format:fix - Format code" |
| 32 | + echo " magex build - Build the project" |
| 33 | + echo " magex help - List all available commands" |
| 34 | + echo "" |
| 35 | + echo "📖 Quick start:" |
| 36 | + echo " 1. Try: magex test" |
| 37 | + echo " 2. Make your changes" |
| 38 | + echo " 3. Run: magex format:fix && magex lint && magex test" |
| 39 | + echo " 4. Commit and push your changes" |
| 40 | + echo "" |
| 41 | + echo "💡 For more help: magex help" |
| 42 | + echo "===============================================" |
25 | 43 |
|
26 | 44 | ports: |
27 | 45 | - port: 8080 |
28 | | - onOpen: open-preview |
29 | | - description: Application |
| 46 | + onOpen: ignore |
| 47 | + description: Application (if needed) |
30 | 48 |
|
31 | 49 | vscode: |
32 | 50 | extensions: |
33 | 51 | - golang.go |
34 | 52 | - github.vscode-pull-request-github |
35 | 53 | - streetsidesoftware.code-spell-checker |
| 54 | + - eamodio.gitlens |
0 commit comments