Add deployment template to Helm chart for workload rollout #53
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: Build & Test Codewise-CLI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Add local replace directive | |
| run: | | |
| go mod edit -replace github.com/aryansharma9917/codewise-cli=./ | |
| echo "✅ Added local replace directive:" | |
| grep "replace" go.mod | |
| - name: Verify module paths exist | |
| run: | | |
| ls -R pkg || echo "❌ pkg directory missing" | |
| ls -R cmd || echo "❌ cmd directory missing" | |
| - name: Tidy and vendor modules | |
| run: | | |
| go mod tidy | |
| go mod vendor | |
| - name: Build CLI | |
| run: go build -v -o codewise main.go | |
| - name: Run Tests | |
| run: go test ./... -v |