Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split examples & Integration Test #27

Merged
merged 17 commits into from
Sep 17, 2019
30 changes: 30 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Integration test
on:
pull_request:
branches:
master


jobs:
build:
name: Run example
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Run Simple Example
uses: ./
with:
entrypoint: .github/workflows/run-example.sh
args: simple
- name: Run Stream Example
uses: ./
with:
entrypoint: .github/workflows/run-example.sh
args: stream
- name: Run WKT Example
uses: ./
with:
entrypoint: .github/workflows/run-example.sh
args: well_known_types

5 changes: 5 additions & 0 deletions .github/workflows/run-example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

gripmock --stub=example/$1/stub example/$1/$1.proto &

go run example/$1/client/*.go
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ RUN mv /protobuf-repo/src/ /protobuf/

RUN rm -rf /protobuf-repo

RUN apk del git

RUN mkdir -p /go/src/github.com/tokopedia/gripmock

COPY . /go/src/github.com/tokopedia/gripmock
Expand All @@ -48,8 +46,6 @@ WORKDIR /go/src/github.com/tokopedia/gripmock
# install gripmock
RUN go install -v

RUN rm -rf *

EXPOSE 4770 4771

ENTRYPOINT ["gripmock"]
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ fi

go build ../.

docker build -t "ahmadmuzakki/gripmock:$1" .
docker build -t "tkpd/gripmock:$1" .
Loading