forked from vk-cs/terraform-provider-vkcs
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (79 loc) · 2.13 KB
/
golangci-lint.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
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
name: CI
on:
push:
tags:
- v*
branches:
- master
pull_request:
jobs:
# Check if there any dirty change for go mod tidy
go-mod:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: Check go mod
run: |
go mod tidy
git diff --exit-code go.mod
# We already run the current golangci-lint in tests, but here we test
# our GitHub action with the latest stable golangci-lint.
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18
- name: lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
# skip cache because of flaky behaviors
skip-build-cache: true
skip-pkg-cache: true
tests-on-windows:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18 # test only release go version to speed up CI
- name: Run tests
run: make.exe test
tests-on-macos:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18 # test only release go version to speed up CI
- name: Run tests
run: make test
tests-on-unix:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
runs-on: ubuntu-latest
strategy:
matrix:
golang:
- 1.18
- 1.19
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.golang }}
- name: Run tests
run: make test