-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (68 loc) · 2.3 KB
/
Copy pathci.yml
File metadata and controls
86 lines (68 loc) · 2.3 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Build
run: go build ./...
- name: Test
run: go test ./... -count=1 -v
- name: Cross-compile guest agent
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o dew-agent-linux-amd64 ./cmd/dew-agent/
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o dew-agent-linux-arm64 ./cmd/dew-agent/
ls -lh dew-agent-linux-*
# The guest agent is //go:build linux and can't run on the macOS test
# job above (go test skips linux-tagged files there). Run its tests
# natively on Linux so the agent's behavior — including the exec stdin
# wiring — is actually exercised, not just cross-compiled.
test-linux-agent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Test guest agent + shared protocol (linux)
run: go test -count=1 -v ./cmd/dew-agent/ ./internal/vsock/
# dew-win is //go:build windows and is skipped by the macOS test job
# (go test ./... excludes windows-tagged files there). Build and test
# it natively on Windows so the wrapper's pure helpers — exec/argv
# building, wsl --list parsing, .wslconfig and package.json detection —
# are compiled and exercised, and windows/arm64 build breaks (which no
# other job would catch) surface here.
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Build dew-win
run: go build ./cmd/dew-win/
- name: Test dew-win
run: go test ./cmd/dew-win/ -count=1 -v -cover
- name: Cross-compile dew-win (windows/arm64)
run: go build ./cmd/dew-win/
env:
GOOS: windows
GOARCH: arm64
npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '20'
- name: Run npm dispatcher + scripts tests
working-directory: npm
run: npm test