forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.11 KB
/
gohai.yml
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
name: "Gohai Test"
# Only run the tests if pkg/gohai was changed
on:
push:
branches:
- main
- "[0-9]+.[0-9]+.x"
paths:
- ".github/workflows/gohai.yml"
- "pkg/gohai/**"
pull_request:
paths:
- ".github/workflows/gohai.yml"
- "pkg/gohai/**"
permissions: {}
jobs:
gohai_test:
strategy:
matrix:
# Use oldest and latest available ubuntu, macos and windows
os:
[
ubuntu-20.04,
ubuntu-latest,
macos-13,
macos-latest,
windows-2019,
windows-latest,
]
# Run tests with both the agent's version and gohai's pinned version
go-file: [.go-version, pkg/gohai/go.mod]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: ${{ matrix.go-file }}
- name: Test
run: cd pkg/gohai && go test -tags=test ./...