From 297ade3616ecd4912e77aa71b9504fb4c52a8f86 Mon Sep 17 00:00:00 2001 From: Psnail <42728902+sdttttt@users.noreply.github.com> Date: Sat, 19 Sep 2020 21:21:01 +0800 Subject: [PATCH] ci: Add matrix build. --- .github/workflows/go.yml | 45 +++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d58350caf..f9201791f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,17 +6,25 @@ on: pull_request: branches: [ master ] + jobs: build: - name: Build - runs-on: ubuntu-latest - steps: + name: Build on ${{ matrix.os }} - Go${{ matrix.go_version }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + go_version: + - 1.13 + os: + - ubuntu-latest - - name: Set up Go 1.13 + steps: + + - name: Set up Go ${{ matrix.go_version }} uses: actions/setup-go@v1 with: - go-version: 1.13 + go-version: ${{ matrix.go_version }} id: go - name: Set up Env @@ -66,6 +74,33 @@ jobs: - name: Coverage run: bash <(curl -s https://codecov.io/bash) + scaffold: + + name: Scaffold Test on ${{ matrix.os }} - Go${{ matrix.go_version }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + go_version: + - 1.13 + os: + - ubuntu-latest + + steps: + + - name: Set up Go ${{ matrix.go_version }} + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go_version }} + id: go + + - name: Set up Env + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + - name: Tool run: | go install ./...