From 69e7735b0c7485688ac013329e7f109ee7fd0507 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 20 Feb 2022 22:14:19 +0800 Subject: [PATCH] add workflow for go server --- .github/workflows/samples-go.yaml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/samples-go.yaml diff --git a/.github/workflows/samples-go.yaml b/.github/workflows/samples-go.yaml new file mode 100644 index 00000000000..12c979f87f3 --- /dev/null +++ b/.github/workflows/samples-go.yaml @@ -0,0 +1,33 @@ +name: Samples Go + +on: + push: + paths: + - 'samples/server/petstore/go*/**' + pull_request: + paths: + - 'samples/server/petstore/go*/**' + +env: + GRADLE_VERSION: 6.9 + +jobs: + build: + name: Build Go + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - samples/client/petstore/go-gin-api-server + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: '^1.17.1' + - name: Install + working-directory: ${{ matrix.sample }} + run: go get github.com/gin-gonic/gin + - name: Test + working-directory: ${{ matrix.sample }} + run: go test -v