-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (38 loc) · 882 Bytes
/
ci.yml
File metadata and controls
45 lines (38 loc) · 882 Bytes
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
name: Go
on:
push:
branches: [ "main", "feature/ci-cd" ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set-up Go
uses: actions/setup-go@v6
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.6
test:
strategy:
matrix:
go: [stable]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set-up Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Run tests
run: go test -v ./...