Debian Codegraph @

.github/workflows/CI.yaml

raw symbols SCIP
1 # SPDX-FileCopyrightText: 2024 Shun Sakai
2 #
3 # SPDX-License-Identifier: Apache-2.0 OR MIT
4
5 name: CI
6
7 on:
8 pull_request:
9 push:
10 branches:
11 - "develop"
12 - "main"
13 schedule:
14 - cron: "0 0 * * 0"
15 workflow_dispatch:
16
17 jobs:
18 test:
19 name: Test
20 runs-on: ${{ matrix.os }}
21 strategy:
22 matrix:
23 os-alias:
24 - ubuntu
25 - macos
26 - windows
27 go-version-alias:
28 - minimum
29 - stable
30 include:
31 - os-alias: ubuntu
32 os: ubuntu-24.04
33 - os-alias: macos
34 os: macos-15
35 - os-alias: windows
36 os: windows-2025
37 - go-version-alias: minimum
38 go-version: "1.22"
39 - go-version-alias: stable
40 go-version: "stable"
41 steps:
42 - name: Set Git to use LF
43 if: matrix.os == 'windows-2025'
44 run: |
45 git config --global core.autocrlf false
46 git config --global core.eol lf
47 - name: Checkout code
48 uses: actions/checkout@v6
49 - name: Setup Go environment
50 uses: actions/setup-go@v6
51 with:
52 go-version: ${{ matrix.go-version }}
53 - name: Run tests
54 run: go test -race -v ./...
55
56 golangci-lint:
57 name: golangci-lint
58 runs-on: ubuntu-24.04
59 steps:
60 - name: Checkout code
61 uses: actions/checkout@v6
62 - name: Setup Go environment
63 uses: actions/setup-go@v6
64 with:
65 go-version: "stable"
66 - name: Run golangci-lint
67 uses: golangci/[email protected]
68 with:
69 version: "latest"
70 args: -v
71
72 prettier:
73 name: Prettier
74 runs-on: ubuntu-24.04
75 steps:
76 - name: Checkout code
77 uses: actions/checkout@v6
78 - name: Setup Node.js environment
79 uses: actions/setup-node@v6
80 with:
81 node-version: 24
82 - name: Run formatter in check mode
83 run: npx prettier -c "**.{md,yaml,yml}"