-
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.19", "1.20"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# Prepare env.
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 #v3.5.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.53.1"
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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- name: Test
run: sh ./run_tests.sh