-
Notifications
You must be signed in to change notification settings - Fork 6
32 lines (30 loc) · 977 Bytes
/
go.yml
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
name: Build and Test
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Go CI
strategy:
matrix:
go: ["1.21", "1.22"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# Prepare env.
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 #v5.0.0
with:
go-version: ${{ matrix.go }}
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2"
shell: bash
- name: Set git config to please linters
run: |
git config --global core.autocrlf false
git config --global core.eol lf
# Test repository.
- name: Check out source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Test
run: sh ./run_tests.sh