-
Notifications
You must be signed in to change notification settings - Fork 169
74 lines (67 loc) · 2.02 KB
/
Copy pathci.yml
File metadata and controls
74 lines (67 loc) · 2.02 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
name: CI
on:
push:
branches: ["main", "copilot/**"]
pull_request:
branches: ["main", "copilot/**"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run checks
run: make check
env:
AGENTFIELD_SERVER: http://localhost:9999
go:
runs-on: ubuntu-latest
env:
# Reproduce go/Dockerfile's sparse SDK clone; keep in sync with its AGENTFIELD_SDK_REF.
AGENTFIELD_SDK_REF: 20955b2637b4708758c328a4f64fe460c7d4b772
AGENTFIELD_REPO: https://github.com/Agent-Field/agentfield.git
GOWORK: off
steps:
- name: Checkout SWE-AF
uses: actions/checkout@v4
with:
path: SWE-AF
- name: Sparse-clone AgentField SDK at pinned ref
run: |
set -euo pipefail
git init -q agentfield
cd agentfield
git remote add origin "${AGENTFIELD_REPO}"
git sparse-checkout init --cone
git sparse-checkout set sdk/go
git fetch --depth 1 origin "${AGENTFIELD_SDK_REF}"
git checkout -q FETCH_HEAD
test -f sdk/go/go.mod
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache-dependency-path: SWE-AF/go/go.sum
- name: gofmt
working-directory: SWE-AF/go
run: |
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then echo "gofmt needed:"; echo "$unformatted"; exit 1; fi
- name: Build
working-directory: SWE-AF/go
run: go build ./...
- name: Vet
working-directory: SWE-AF/go
run: go vet ./...
- name: Test (race)
working-directory: SWE-AF/go
run: go test -race -count=1 ./...