Skip to content

Commit fba825c

Browse files
committed
added workflow
1 parent ee353c8 commit fba825c

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
merge_group:
7+
8+
# limit the access of the generated GITHUB_TOKEN
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
strategy:
15+
matrix:
16+
os: [windows-2022, windows-latest]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
# See https://github.com/actions/setup-go/pull/515
21+
- uses: antontroshin/setup-go@bda02de8887c9946189f81e7e59512914aeb9ea4
22+
with:
23+
go-version-file: go.mod
24+
cache: true
25+
- name: install mage
26+
run: go install github.com/magefile/mage
27+
- run: |
28+
mage -debug check
29+
go vet ./...
30+
31+
update:
32+
strategy:
33+
matrix:
34+
os: [ windows-2022, windows-latest ]
35+
runs-on: ${{ matrix.os }}
36+
defaults:
37+
run:
38+
shell: C:\cygwin\bin\bash.exe '{0}'
39+
steps:
40+
- uses: actions/checkout@v4
41+
# See https://github.com/actions/setup-go/pull/515
42+
- uses: antontroshin/setup-go@bda02de8887c9946189f81e7e59512914aeb9ea4
43+
with:
44+
go-version-file: go.mod
45+
cache: true
46+
- name: install mage
47+
run: go install github.com/magefile/mage
48+
- name: install protoc
49+
run: |
50+
curl -sSfL -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
51+
mkdir -p $GITHUB_WORKSPACE/.protoc
52+
unzip -o protoc.zip -d $GITHUB_WORKSPACE/.protoc
53+
echo "$GITHUB_WORKSPACE/.protoc/bin" >> $GITHUB_PATH
54+
- run: mage -debug update
55+
- run: go test -v -race ./...

0 commit comments

Comments
 (0)