diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..80ece02 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +charset = utf-8 +trim_trailing_whitespace = true +end_of_line = lf +insert_final_newline = true + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 + +[*.{markdown,md}] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..f91e781 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,22 @@ +name: go + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '^1.21' + + - name: Install dependencies + run: go mod download + + - name: Build + run: go build -v ./... + + - name: Test + run: go test ./... -v -coverprofile coverage.txt -covermode atomic -coverpkg ./... -race diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..e6d8175 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,21 @@ +name: golangci-lint + +on: [push] + +permissions: + contents: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '^1.21' + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7ca2f56..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: go - -go: - - "1.12.x" - - "1.13.x" - - "tip" - -env: - - GO111MODULE=on - -before_install: - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0 - -install: - - go mod download - -script: - - go test ./... -v -coverprofile coverage.txt -covermode count -coverpkg ./... - - golangci-lint run ./... - -after_script: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/README.md b/README.md index 21d3412..9af0a3f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -[![Build Status](https://travis-ci.com/PaddleHQ/go-aws-ssm.svg?branch=master)](https://travis-ci.com/PaddleHQ/go-aws-ssm) [![codecov](https://codecov.io/gh/PaddleHQ/go-aws-ssm/branch/master/graph/badge.svg)](https://codecov.io/gh/PaddleHQ/go-aws-ssm) [![Go Report Card](https://goreportcard.com/badge/github.com/PaddleHQ/go-aws-ssm)](https://goreportcard.com/report/github.com/PaddleHQ/go-aws-ssm) [![GoDoc](https://godoc.org/github.com/PaddleHQ/go-aws-ssm?status.svg)](https://pkg.go.dev/github.com/PaddleHQ/go-aws-ssm) diff --git a/go.mod b/go.mod index 5333cbd..a9d0862 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,15 @@ module github.com/PaddleHQ/go-aws-ssm -go 1.12 +go 1.21 require ( github.com/aws/aws-sdk-go v1.16.24 - github.com/davecgh/go-spew v1.1.1 // indirect github.com/mitchellh/mapstructure v1.1.2 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect github.com/stretchr/testify v1.3.0 // indirect golang.org/x/net v0.0.0-20190119204137-ed066c81e75e // indirect golang.org/x/text v0.3.0 // indirect diff --git a/go.sum b/go.sum index edb2a80..5702120 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,5 @@ github.com/aws/aws-sdk-go v1.16.24 h1:I/A3Hwbgs3IEAP6v1bFpHKXiT7wZDoToX9cb00nxZnM= github.com/aws/aws-sdk-go v1.16.24/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=