Debian Codegraph @

.github/workflows/ci.yaml

raw
1 name: CI
2
3 on:
4 push:
5 branches: [main]
6 pull_request:
7
8 permissions:
9 contents: read
10
11 jobs:
12 test:
13 name: Test
14 runs-on: ${{ matrix.os }}
15
16 strategy:
17 # Fail fast is disabled because there are Go version specific features and tests
18 # that should be able to fail independently.
19 fail-fast: false
20 matrix:
21 os: [ubuntu-latest, macos-latest, windows-latest]
22 go: ["1.23", "1.24", "1.25"]
23
24 steps:
25 - name: Checkout repository
26 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27
28 - name: Set up Go
29 uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
30 with:
31 go-version: ${{ matrix.go }}
32
33 - name: Test
34 run: go test -count 10 -shuffle on -race -v ./...
35
36 fuzz:
37 name: Fuzz
38 runs-on: ${{ matrix.os }}
39
40 strategy:
41 # Fail fast is disabled because there are Go version specific features and tests
42 # that should be able to fail independently.
43 fail-fast: false
44 matrix:
45 os: [ubuntu-latest, macos-latest, windows-latest]
46 go: ["1.23", "1.24", "1.25"]
47
48 steps:
49 - name: Checkout repository
50 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51
52 - name: Set up Go
53 uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
54 with:
55 go-version: ${{ matrix.go }}
56
57 - name: Test
58 run: go test -race -v -fuzz=Fuzz -fuzztime=60s
59
60 lint:
61 name: Lint
62 runs-on: ubuntu-latest
63
64 steps:
65 - name: Checkout repository
66 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67
68 - name: Install Nix
69 uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487 # v31.6.1
70
71 - name: Configure cachix
72 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
73 with:
74 name: devenv
75
76 - name: Install devenv
77 run: nix profile add nixpkgs#devenv
78
79 - name: Lint
80 run: devenv shell -- just lint
81
82 dependency-review:
83 name: Dependency review
84 runs-on: ubuntu-latest
85 if: github.event_name == 'pull_request'
86
87 steps:
88 - name: Checkout repository
89 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
90
91 - name: Dependency Review
92 uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0