-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 845 Bytes
/
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
---
name: test
on:
pull_request: {}
push:
branches: [main]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
DEBIAN_FRONTEND: noninteractive
TZ: 'Asia/Tokyo'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- uses: golangci/golangci-lint-action@v3
test:
strategy:
matrix:
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test -v ./...