Merge pull request #2 from Coder-Harshit/dev #16
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| # build: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Set up Go | |
| # uses: actions/setup-go@v5 | |
| # with: | |
| # go-version: '1.24.x' | |
| # - name: Installing Agent Dependencies | |
| # run: cd agent && go get | |
| # - name: Installing Master Dependencies | |
| # run: cd master && go get | |
| # - name: Vet Agent | |
| # run: cd agent && go vet | |
| # - name: Vet Master | |
| # run: cd agent && go vet | |
| # - name: Build Agent | |
| # run: cd agent && go build -o build/agent main.go | |
| # - name: Build Master | |
| # run: cd master && go build -o build/master main.go | |
| # # - name: Test | |
| # # run: go test -v ./... | |
| # - name: Success | |
| # run: echo "✅ All checks passed. Code is clean." | |
| agent-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.x' | |
| - name: Installing Dependencies | |
| run: go mod tidy | |
| - name: Vet Agent | |
| run: go vet ./agent | |
| - name: Create build directory | |
| run: mkdir -p build | |
| - name: Build Agent | |
| run: go build -o build/agent agent/main.go | |
| - name: Verify Binary | |
| run: file build/agent | |
| - name: Success | |
| run: echo "✅ All Agent checks passed." | |
| relay-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.x' | |
| - name: Installing Dependencies | |
| run: go mod tidy | |
| - name: Vet Relay | |
| run: go vet ./relay | |
| - name: Create build directory | |
| run: mkdir -p build | |
| - name: Build Relay | |
| run: go build -o build/relay relay/main.go | |
| - name: Verify Binary | |
| run: file build/relay | |
| - name: Success | |
| run: echo "✅ All Relay checks passed." | |
| master-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24.x' | |
| - name: Installing Dependencies | |
| run: go mod tidy | |
| - name: Vet Master | |
| run: go vet ./master | |
| - name: Create build directory | |
| run: mkdir -p build | |
| - name: Build Master | |
| run: go build -o build/master master/main.go | |
| - name: Verify Binary | |
| run: file build/master | |
| - name: Success | |
| run: echo "✅ All Master checks passed." |