From 5284f34b6f5f5677f0f6e6e52258a590e558e786 Mon Sep 17 00:00:00 2001 From: Cosmin Cojocar Date: Mon, 30 Mar 2020 12:52:42 +0200 Subject: [PATCH] Change the GitHub workflow to use an action which install Go using a Go version from the matrix Signed-off-by: Cosmin Cojocar --- .github/workflows/main.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 585a559..2212928 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,31 +8,36 @@ on: - master jobs: tests: - runs-on: ubuntu-latest strategy: matrix: - go-version: ["go1.12", "go1.13", "go1.14"] + go-version: [go1.12.x, go1.13.x, go1.14.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} env: - GO111MODULE: "on" + GO111MODULE: on steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} - name: Checkout Source uses: actions/checkout@v2 - name: Run Tests - uses: cedrickring/golang-action/${{ matrix.go-version }}@1.5.1 - with: - args: make test + run: make test coverage: needs: tests runs-on: ubuntu-latest env: - GO111MODULE: "on" + GO111MODULE: on steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: go1.14.x - name: Checkout Source uses: actions/checkout@v2 - name: Create Test Coverage - uses: cedrickring/golang-action@1.5.1 - with: - args: make test-coverage + run: make test-coverage - name: Upload Test Coverage uses: codecov/codecov-action@v1 with: