From c93c108d3918f11ecfdbb23c85ecf684d0053657 Mon Sep 17 00:00:00 2001 From: Sam Smith Date: Mon, 17 Feb 2020 17:28:22 +0000 Subject: [PATCH] Updates for v0.0.2 including some CI changes --- .editorconfig | 7 +- .github/workflows/continuous-integration.yml | 67 ++++++++++++++++++++ .github/workflows/go.yml | 28 -------- CHANGELOG.md | 15 +++-- README.md | 2 +- 5 files changed, 84 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/continuous-integration.yml delete mode 100644 .github/workflows/go.yml diff --git a/.editorconfig b/.editorconfig index 4fbc1b6..09b5f51 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,15 +3,18 @@ root = true [*] end_of_line = lf trim_trailing_whitespace = true +charset = utf-8 [*.go] -charset = utf-8 indent_size = 4 indent_style = tab max_line_length = 80 [*.md] -charset = utf-8 indent_size = 4 indent_style = tab max_line_length = 80 + +[*.{yml,yaml}] +indent_size = 2 +indent_style = space diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..a07b064 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,67 @@ +on: + pull_request: + push: +name: test +jobs: + ubuntu: + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13.x + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: go mod download + + - name: Build + run: go build + + - name: Test + run: go test + + macOS: + runs-on: macos-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13.x + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: go mod download + + - name: Build + run: go build + + - name: Test + run: go test + + windows: + runs-on: windows-latest + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13.x + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: go mod download + + - name: Build + run: go build + + - name: Test + run: go test diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 2f9c687..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Go -on: [push] -jobs: - - test: - name: Test - runs-on: ubuntu-latest - steps: - - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Get dependencies - run: | - go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure - fi - - - name: Test - run: go test diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb5f6f..7524d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - - Moved to using s2 Polygons instead of just s2 Loops - - Added 2 letter country codes, continents, regions and subregions to output - - Using github.com/go-test/deep for nicer printing in tests - - Added type `Rgeo` and function `New` to parse the JSON and create the polygons +## [0.0.2] - 2020-02-17 + +### Added + + - 2 letter country codes, continents, regions and subregions to output + - Type `Rgeo` and function `New` to parse the JSON and create the polygons ahead of time so it doesn't need to be done every time `ReverseGeocode` is run +### Changed + + - Moved to using s2 Polygons instead of just s2 Loops + - Using github.com/go-test/deep for nicer printing in tests + ## [0.0.1] - 2020-02-15 ### Added diff --git a/README.md b/README.md index eb2cee6..9e6372f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# rgeo +# rgeo ![](https://img.shields.io/github/workflow/status/sams96/rgeo/test?style=flat-square) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/sams96/rgeo) ![](https://goreportcard.com/badge/github.com/sams96/rgeo?style=flat-square) Package rgeo is a fast, simple solution for local reverse geocoding