-
Notifications
You must be signed in to change notification settings - Fork 219
93 lines (93 loc) · 2.91 KB
/
Copy pathtest.yml
File metadata and controls
93 lines (93 loc) · 2.91 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
name: Test
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
go-version: [1.25.x, 1.26.x]
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Build
run: |
go build ./...
- name: Run Windows Unit Tests
run: |
$env:GH_ACTION="TRUE"
go test -v -race ./mount/...
test:
strategy:
matrix:
go-version: [1.25.x, 1.26.x]
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Test
run: |
make test
verify-go-directive:
strategy:
matrix:
go-version: [1.25.x, 1.26.x]
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Verify go directive
run: |
make verify-go-directive
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: v1.25
- name: Checkout code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.4.0
args: -v --enable-only govet,misspell,ineffassign
apidiff:
runs-on: ubuntu-latest
if: github.base_ref
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: 1.25.x
- name: Add GOBIN to PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install dependencies
run: go install golang.org/x/exp/cmd/apidiff@latest
- name: Checkout old code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
ref: ${{ github.base_ref }}
path: "old"
- name: Checkout new code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
path: "new"
- name: APIDiff
run: ./hack/verify-apidiff.sh -d ../old
working-directory: "new"