Skip to content

Commit e4c3a0b

Browse files
committed
Add CI tests
1 parent 187fcc1 commit e4c3a0b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
test:
13+
strategy:
14+
matrix:
15+
webrpc-gen: [v0.6.1]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: 1.19
23+
- name: Install webrpc-gen
24+
#run: go install github.com/webrpc/webrpc/cmd/webrpc-gen@${{ matrix.webrpc-gen }}
25+
run: |
26+
git clone --single-branch https://github.com/golang-cz/webrpc.git --branch templates_v0.7.0
27+
cd webrpc
28+
make install
29+
- name: Regenerate examples
30+
run: cd _examples && make generate
31+
- name: Git diff of regenerated files
32+
run: cd _examples && make diff

_examples/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.PHONY: all generate diff
2+
3+
all: generate diff
4+
5+
generate:
6+
webrpc-gen -schema=./hello-webrpc/hello-api.ridl -target=../ -extra=noexports -client -out=./hello-webrpc/webapp/client.gen.js
7+
8+
diff:
9+
git diff --color --ignore-all-space --ignore-blank-lines --exit-code .

0 commit comments

Comments
 (0)