This repository was archived by the owner on Jan 23, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
140 lines (119 loc) · 5.96 KB
/
go.yml
File metadata and controls
140 lines (119 loc) · 5.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Go Build and Test
on:
push:
branches: [ "main" ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
permissions:
contents: read
packages: read
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [blacksmith-4vcpu-ubuntu-2204, blacksmith-4vcpu-ubuntu-2204-arm, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: useblacksmith/setup-go@v6
with:
go-version: '1.25'
- name: Generate Error Codes
run: go generate ./...
- name: Build
run: go build -v .
- name: Go Vulnerability Scan
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
- name: Test
run: go test -v ./...
test-install:
name: Test Install Script
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [blacksmith-4vcpu-ubuntu-2204, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Test Install Script (Linux)
if: matrix.os == 'blacksmith-4vcpu-ubuntu-2204'
run: |
chmod +x ./install_test/docker-test-install.sh
./install_test/docker-test-install.sh
shell: sh
- name: Test Install Script (Linux ARM)
if: matrix.os == 'blacksmith-4vcpu-ubuntu-2204-arm'
run: |
chmod +x ./install_test/docker-test-install.sh
./install_test/docker-test-install.sh
shell: sh
- name: Test Install Script (macOS)
if: matrix.os == 'macos-latest'
run: |
chmod +x ./install.sh
# Test with default options (latest version) - use --no-brew to skip Homebrew
./install.sh -d /tmp/agentuity-test --no-brew
# Verify installation
/tmp/agentuity-test/agentuity --version
# Test installing over existing installation to verify segfault fix
echo "Testing installation over existing binary to verify segfault fix..."
./install.sh -d /tmp/agentuity-test --no-brew
# Verify installation still works after reinstall
/tmp/agentuity-test/agentuity --version
echo "macOS double installation test passed - segfault fix verified"
shell: bash
- name: Test Bash Install Script (Windows)
if: matrix.os == 'windows-latest'
run: |
# Windows test - simplified to avoid bash usage
Write-Host "Testing bash install script on Windows..."
# Make script executable using PowerShell
if (Test-Path "install.sh") {
Write-Host "Found install.sh script"
} else {
Write-Host "install.sh not found"
exit 1
}
# Test with default options (latest version)
Write-Host "Testing install script with default options..."
& sh -c "./install.sh -d '$env:TEMP/agentuity-test-download'"
# Check if the script correctly detected Windows and aborted
if ($LASTEXITCODE -eq 1) {
$output = & sh -c "./install.sh -d '$env:TEMP/agentuity-test-download'" 2>&1
if ($output -match "Windows is not supported") {
Write-Host "Windows detection test passed: Script correctly detected Windows environment and aborted"
exit 0
} else {
Write-Host "Windows detection test failed: Script did not abort with the expected message"
exit 1
}
} else {
Write-Host "Windows detection test failed: Script did not abort as expected"
exit 1
}
shell: pwsh
- name: Test PowerShell Install Script (Windows)
if: matrix.os == 'windows-latest'
env:
GITHUB_TOKEN: ${{ github.token }}
CI: true
AGENTUITY_TEST_VERSION: "0.0.74"
run: |
Write-Host "Testing PowerShell install script on Windows..."
# Since we're removing Windows native support and only supporting Windows via WSL,
# we don't need a PowerShell install script anymore.
# This test is now skipped intentionally.
Write-Host "Windows native installation is not supported - users should use WSL instead"
Write-Host "PowerShell install script test skipped intentionally"
exit 0
shell: pwsh