-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (54 loc) · 1.51 KB
/
verify.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
# SPDX-FileCopyrightText: The terraform-provider-k8s Authors
# SPDX-License-Identifier: 0BSD
name: Verify Commits
on:
pull_request:
branches: [ main ]
paths:
- .github/workflows/verify.yml
- go.mod
- go.sum
- main.go
- docs/**
- examples/**
- internal/**
- templates/**
- tools/**
jobs:
build:
name: Build Project
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: setup_go
name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- id: tools_test
name: Tools Tests
run: go test -v -timeout=120s ./tools/internal/...
- id: provider_tests
name: Provider Tests
run: go test -v -timeout=120s ./internal/...
- id: generate_docs
name: Generate Documentation
run: go generate ./tools/docs.go
- id: verify_docs
name: Verify Documentation
run: |
git diff --compact-summary --exit-code || \
(echo "*** Unexpected differences after code generation. Run 'make docs' and commit."; exit 1)
- id: build
name: Build Provider
run: go build -v
- name: Wait for other checks to succeed
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
running-workflow-name: Build Project
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10