-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.29 KB
/
CI.yaml
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
# SPDX-FileCopyrightText: 2024 Shun Sakai
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: CI
on:
pull_request:
push:
branches:
- "develop"
- "master"
schedule:
- cron: "0 0 * * 0"
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-24.04
- macos-14
- windows-2022
go-version:
- "1.22" # Go version
- "stable"
steps:
- name: Set Git to use LF
if: matrix.os == 'windows-2022'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run tests
run: go test -race -v ./...
golangci-lint:
name: golangci-lint
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6.1.1
with:
version: "latest"
args: -E gofmt,goimports -v