-
Notifications
You must be signed in to change notification settings - Fork 36
45 lines (39 loc) · 963 Bytes
/
Copy pathtest.yaml
File metadata and controls
45 lines (39 loc) · 963 Bytes
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
name: Test
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- 'imgs/**'
- 'LICENSE'
pull_request:
env:
PROTOC_VERSION: "21.12"
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: go mod tidy
run: |
go mod tidy
if [ -n "$(git status --porcelain)" ]; then
echo "Run 'go mod tidy' and push it"
exit 1
fi
- name: Install protoc
run: |
wget $PB_REL/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local/bin/
env:
PB_REL: https://github.com/protocolbuffers/protobuf/releases
- name: Run unit tests
run: make test