This repository was archived by the owner on Mar 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (84 loc) · 2.64 KB
/
gripmock-integration.yml
File metadata and controls
101 lines (84 loc) · 2.64 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: GripMock Integration Tests
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
gripmock-integration:
name: Test grpctestify against GripMock
runs-on: ubuntu-latest
steps:
- name: Checkout grpctestify
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.25'
cache: true
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: Install dependencies
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y libxml2-utils
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
grpcurl --version
- name: Install bashly and generate grpctestify
run: |
set -euo pipefail
gem install bashly
make generate
mkdir -p $HOME/bin
cp grpctestify.sh $HOME/bin/grpctestify
echo "$HOME/bin" >> $GITHUB_PATH
- name: Verify grpctestify installation
run: |
set -euo pipefail
grpctestify --version
- name: Clone GripMock repository to tmp
run: |
set -euo pipefail
cd /tmp
git clone https://github.com/bavix/gripmock.git
cd gripmock
- name: Find and checkout latest tag
run: |
set -euo pipefail
cd /tmp/gripmock
latest_tag=$(git describe --tags --abbrev=0)
echo "Latest tag: $latest_tag"
git checkout $latest_tag
- name: Start GripMock server with examples
run: |
set -euo pipefail
cd /tmp/gripmock
go run main.go examples -s examples &
echo $! > gripmock.pid
# Wait for server to start and verify it's ready
go run main.go check
echo "GripMock server started with PID $(cat gripmock.pid)"
- name: Test grpctestify with GripMock examples
run: |
set -euo pipefail
cd /tmp/gripmock
# Run grpctestify tests (v1.0.0 with smart defaults)
grpctestify examples --verbose
echo "GripMock integration test completed successfully"
- name: Cleanup gripmock server
if: always()
run: |
set -euo pipefail
cd /tmp/gripmock || exit 0
if [ -f gripmock.pid ]; then
pid=$(cat gripmock.pid)
if kill -0 "$pid" 2>/dev/null; then
kill "$pid"
fi
rm -f gripmock.pid
fi