From 81600d98703c4c4715c6a1e9bc2076961dc13f8a Mon Sep 17 00:00:00 2001 From: Georg Pirklbauer Date: Fri, 10 Jun 2022 16:49:37 +0200 Subject: [PATCH] update GH action (#15) --- .github/workflows/test-lint-go.yml | 54 ++++++++++++++++++------------ go.mod | 2 +- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test-lint-go.yml b/.github/workflows/test-lint-go.yml index 88d62fd..71ed36d 100644 --- a/.github/workflows/test-lint-go.yml +++ b/.github/workflows/test-lint-go.yml @@ -1,42 +1,52 @@ name: Go Lint and Unit Tests -on: +on: push: branches: - main pull_request: jobs: - lint: + lint: strategy: fail-fast: true - matrix: - go: [ '1.14', '1.15', '1.16' ] + matrix: + go: + - '1.17' + - '1.18' + runs-on: ubuntu-latest + name: Lint Go ${{ matrix.go }} steps: - - uses: actions/checkout@v2 - - name: Lint Go ${{ matrix.go }} - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go }} - - run: go version - - run: test -z $(gofmt -l .) + - uses: actions/checkout@v3 + - name: Lint Go ${{ matrix.go }} + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + - run: go version + - run: test -z $(gofmt -l .) build: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest ] - go: [ '1.14', '1.15', '1.16' ] - runs-on: ${{ matrix.os }} + go: + - '1.17' + - '1.18' + os: + - 'ubuntu-latest' + - 'windows-latest' + - 'macos-latest' + + runs-on: ${{ matrix.os }} name: Build and test Go ${{ matrix.go }} on ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Build and test Go ${{ matrix.go }} on ${{ matrix.os }} - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go }} - - run: go version - - run: go build ./... - - run: go test ./... + - uses: actions/checkout@v3 + - name: Build and test Go ${{ matrix.go }} on ${{ matrix.os }} + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + - run: go version + - run: go build ./... + - run: go test ./... diff --git a/go.mod b/go.mod index 2f36496..0a6ff81 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/dynatrace-oss/dynatrace-metric-utils-go -go 1.16 +go 1.17