From 251eae85ff9fddd48a1337382aaf946c938b6eb3 Mon Sep 17 00:00:00 2001 From: Rashad Ansari Date: Fri, 14 Apr 2023 20:54:50 +0200 Subject: [PATCH] Use github action --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 18 ------------------ README.md | 11 +---------- 3 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c0fe734 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Build + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + + build: + name: Build + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Install golangci-lint + run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.30.0 + - name: Lint + run: make lint + - name: Test + run: make test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 06066ff..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go - -go: - - "1.15.x" - -services: - - docker - -before_install: - - make install - -script: -# - make lint - - docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.30.0 golangci-lint run -v - - make ci-test - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 25dabbb..c53d661 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Geo Lookups -[![Build Status][1]][2] -[![codecov][3]][4] -[![MIT Licence][5]][6] +[![Build](https://github.com/4lie/lookups/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/4lie/lookups/actions/workflows/build.yml) [![PkgGoDev](https://pkg.go.dev/badge/github.com/4lie/lookups)](https://pkg.go.dev/github.com/4lie/lookups) ## Introduction @@ -18,13 +16,6 @@ It uses Google's S2 Library for indexing and it's super fast :rocket:. go get github.com/4lie/lookups ``` -[1]: https://img.shields.io/travis/4lie/lookups?logo=travis&style=flat-square -[2]: https://travis-ci.org/4lie/lookups -[3]: https://img.shields.io/codecov/c/gh/4lie/lookups?logo=codecov&style=flat-square -[4]: https://codecov.io/gh/4lie/lookups -[5]: https://img.shields.io/github/license/4lie/lookups?style=flat-square -[6]: https://opensource.org/licenses/mit-license.php - ## Examples `lookups_test.go` contains several useful examples. You can check visualizations of them here.