-
Notifications
You must be signed in to change notification settings - Fork 59
84 lines (72 loc) · 1.69 KB
/
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
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
82
83
84
name: CI
on:
- push
- pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
make_target: [test, vet]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ~1.23
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions
- name: Set build variables
run: |
echo "MAKE_TARGET=${{ matrix.make_target }}" >> $GITHUB_ENV
- name: Run ${{matrix.make_target}}
run: |
make $MAKE_TARGET
lint:
runs-on: ubuntu-latest
container: bflad/tfproviderlint:0.29.0
steps:
- uses: actions/checkout@v2
- run: |
tfproviderlint \
-c 1 \
-AT001 \
-AT002 \
-S001 \
-S002 \
-S003 \
-S004 \
-S005 \
-S007 \
-S008 \
-S009 \
-S010 \
-S011 \
-S012 \
-S013 \
-S014 \
-S015 \
-S016 \
-S017 \
-S019 \
./...
docs:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1.23
- name: Checkout
uses: actions/checkout@v2
- name: Docscheck
run: |
make docscheck