forked from hashicorp/terraform-provider-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (38 loc) · 1.03 KB
/
checkers-and-linters.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
name: Essential checkers and linters
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
checkers-and-linters:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
# Secrets are not available on pull requests.
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.RO_DOCKERHUB_USER }}
password: ${{ secrets.RO_DOCKERHUB_TOKEN }}
- name: Install cookie
run: scripts/gogetcookie.sh
- name: Run checkers
run: |
make depscheck
make fmtcheck
make test-compile
make vet
- name: Run linters
run: |
make docs-lint
make tests-lint