Skip to content

[pull] main from AryanSharma9917:main #58

[pull] main from AryanSharma9917:main

[pull] main from AryanSharma9917:main #58

Workflow file for this run

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