-
Notifications
You must be signed in to change notification settings - Fork 116
48 lines (41 loc) · 1.36 KB
/
checks.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
on:
pull_request:
# Commented paths to avoid skipping required workflow
# See https://github.saobby.my.eu.orgmunity/t/feature-request-conditional-required-checks/16761
# paths:
# - .github/workflows/checks.yml
# - .github/PULL_REQUEST/pull_request.go
# - .golangci.yml
# - "**/*.go"
# - go.mod
# - go.sum
name: checks
jobs:
linting:
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
all_but_latest: true
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.2"
stable: true
check-latest: true
- name: Snake case test cases
run: |
go run ./cmd/testcases/main.go && \
git diff --exit-code
- name: Lint
run: make lint
- name: Up to date Go proto generated
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 && \
PROTOC_VERSION=24.4 && \
curl -sL --output protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" && \
sudo unzip protoc.zip -d /usr/local && \
rm protoc.zip && \
go generate -run "protoc" ./... && \
git diff --exit-code