Skip to content

Commit cb2c7d0

Browse files
authored
Merge pull request #28 from persys-dev/feat/monorepo-merge-submodules
Feat/monorepo merge submodules
2 parents 4026348 + 9e9cd9e commit cb2c7d0

151 files changed

Lines changed: 37364 additions & 462 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Compute Agent CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
paths:
7+
- 'compute-agent/**'
8+
- 'pkg/**'
9+
- 'sdk/**'
10+
- 'go.mod'
11+
- 'go.sum'
12+
- '.github/workflows/compute-agent-ci.yml'
13+
pull_request:
14+
branches: [ main, master ]
15+
paths:
16+
- 'compute-agent/**'
17+
- 'pkg/**'
18+
- 'sdk/**'
19+
- 'go.mod'
20+
- 'go.sum'
21+
- '.github/workflows/compute-agent-ci.yml'
22+
23+
jobs:
24+
unit-tests:
25+
name: Unit Tests
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version-file: compute-agent/go.mod # Point to service go.mod
35+
cache: true
36+
37+
- name: Run unit tests with race and coverage
38+
run: |
39+
cd compute-agent
40+
make test-unit || go test ./... -race -coverprofile=coverage.txt
41+
42+
- name: Upload coverage artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: unit-coverage
46+
path: compute-agent/coverage.txt
47+
if-no-files-found: warn
48+
49+
e2e-tests:
50+
name: End-to-End Tests
51+
runs-on: ubuntu-latest
52+
needs: [unit-tests]
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
57+
- name: Setup Go
58+
uses: actions/setup-go@v5
59+
with:
60+
go-version-file: compute-agent/go.mod
61+
cache: true
62+
63+
- name: Run end-to-end tests
64+
run: |
65+
cd compute-agent
66+
make test-e2e
67+
68+
build-binaries:
69+
name: Build Binaries
70+
runs-on: ubuntu-latest
71+
needs: [unit-tests]
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@v4
75+
76+
- name: Setup Go
77+
uses: actions/setup-go@v5
78+
with:
79+
go-version-file: compute-agent/go.mod
80+
cache: true
81+
82+
- name: Build agent and client
83+
run: |
84+
cd compute-agent
85+
go build -v ./cmd/agent
86+
go build -v ./examples/client
87+
88+
docker-build:
89+
name: Docker Build
90+
runs-on: ubuntu-latest
91+
needs: [unit-tests]
92+
steps:
93+
- name: Checkout
94+
uses: actions/checkout@v4
95+
96+
- name: Set up Docker Buildx
97+
uses: docker/setup-buildx-action@v3
98+
99+
- name: Build optimized runtime image
100+
uses: docker/build-push-action@v6
101+
with:
102+
context: . # Root context (needed for pkg/)
103+
file: ./compute-agent/Dockerfile
104+
target: runtime
105+
push: false
106+
tags: persys/compute-agent:ci-runtime
107+
cache-from: type=gha
108+
cache-to: type=gha,mode=max

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
[submodule "persys-operator"]
22
path = persys-operator
33
url = https://github.com/persys-dev/persys-operator.git
4-
[submodule "compute-agent"]
5-
path = compute-agent
6-
url = https://github.com/persys-dev/compute-agent.git
7-
[submodule "persysctl"]
8-
path = persysctl
9-
url = https://github.com/persys-dev/persysctl.git

compute-agent

Lines changed: 0 additions & 1 deletion
This file was deleted.

compute-agent/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bin/
2+
ai/
3+
persys_compute_agent_design_doc.pdf
4+
FIXES_SUMMARY.md

0 commit comments

Comments
 (0)