Skip to content

Commit

Permalink
update GH action (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
pirgeo committed Jun 10, 2022
1 parent 470b482 commit 81600d9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
54 changes: 32 additions & 22 deletions .github/workflows/test-lint-go.yml
Original file line number Diff line number Diff line change
@@ -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 ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/dynatrace-oss/dynatrace-metric-utils-go

go 1.16
go 1.17

0 comments on commit 81600d9

Please sign in to comment.