Debian Codegraph @

.github/workflows/test.yml

raw
1 name: Test
2 on: [push, pull_request]
3 jobs:
4 build:
5 strategy:
6 matrix:
7 go-version: [1.25.x, 1.26.x]
8 platform: [windows-latest]
9 runs-on: ${{ matrix.platform }}
10 steps:
11 - name: Install Go
12 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
13 with:
14 go-version: ${{ matrix.go-version }}
15 - name: Checkout code
16 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
17 - name: Build
18 run: |
19 go build ./...
20 - name: Run Windows Unit Tests
21 run: |
22 $env:GH_ACTION="TRUE"
23 go test -v -race ./mount/...
24 test:
25 strategy:
26 matrix:
27 go-version: [1.25.x, 1.26.x]
28 platform: [ubuntu-latest, macos-latest]
29 runs-on: ${{ matrix.platform }}
30 steps:
31 - name: Install Go
32 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
33 with:
34 go-version: ${{ matrix.go-version }}
35 - name: Checkout code
36 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
37 - name: Test
38 run: |
39 make test
40 verify-go-directive:
41 strategy:
42 matrix:
43 go-version: [1.25.x, 1.26.x]
44 platform: [ubuntu-latest, macos-latest]
45 runs-on: ${{ matrix.platform }}
46 steps:
47 - name: Install Go
48 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
49 with:
50 go-version: ${{ matrix.go-version }}
51 - name: Checkout code
52 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
53 - name: Verify go directive
54 run: |
55 make verify-go-directive
56 lint:
57 runs-on: ubuntu-latest
58 steps:
59 - name: Install Go
60 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
61 with:
62 go-version: v1.25
63 - name: Checkout code
64 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
65 - name: Lint
66 uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
67 with:
68 version: v2.4.0
69 args: -v --enable-only govet,misspell,ineffassign
70 apidiff:
71 runs-on: ubuntu-latest
72 if: github.base_ref
73 steps:
74 - name: Install Go
75 uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
76 with:
77 go-version: 1.25.x
78 - name: Add GOBIN to PATH
79 run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
80 - name: Install dependencies
81 run: go install golang.org/x/exp/cmd/apidiff@latest
82 - name: Checkout old code
83 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
84 with:
85 ref: ${{ github.base_ref }}
86 path: "old"
87 - name: Checkout new code
88 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
89 with:
90 path: "new"
91 - name: APIDiff
92 run: ./hack/verify-apidiff.sh -d ../old
93 working-directory: "new"