From b0090dbd8633b11e5973e718cd4a150e0f0e2579 Mon Sep 17 00:00:00 2001 From: Artem Navoiev Date: Tue, 27 Aug 2019 14:42:46 +0300 Subject: [PATCH] add github actions (#160) --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 26 ------------------------- README.md | 2 +- 3 files changed, 41 insertions(+), 27 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 000000000..d19960e07 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: main +on: + - push +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + - name: Code checkout + uses: actions/checkout@v1 + - name: Dependencies + env: + GO111MODULE: off + run: | + go get -v golang.org/x/lint/golint + go get -u github.com/kisielk/errcheck + - name: Build + env: + GO111MODULE: on + run: | + export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14 + make check-all + git diff --exit-code + make test-full + make test-pure + make victoria-metrics + make victoria-metrics-pure + make victoria-metrics-arm + make victoria-metrics-arm64 + - name: Publish coverage + uses: codecov/codecov-action@v1.0.0 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage.txt + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 96c797fea..000000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: go - -go: - - 1.12.x - -install: make - -env: - - GO111MODULE=on - -before_install: - - GO111MODULE=off go get -v golang.org/x/lint/golint - - GO111MODULE=off go get -u github.com/kisielk/errcheck - -script: - - make check-all - - git diff --exit-code - - make test-full - - make test-pure - - make victoria-metrics - - make victoria-metrics-pure - - make victoria-metrics-arm - - make victoria-metrics-arm64 - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 867acda33..a346f02fb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](http://slack.victoriametrics.com/) [![GitHub license](https://img.shields.io/github/license/VictoriaMetrics/VictoriaMetrics.svg)](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/LICENSE) [![Go Report](https://goreportcard.com/badge/github.com/VictoriaMetrics/VictoriaMetrics)](https://goreportcard.com/report/github.com/VictoriaMetrics/VictoriaMetrics) -[![Build Status](https://travis-ci.org/VictoriaMetrics/VictoriaMetrics.svg?branch=master)](https://travis-ci.org/VictoriaMetrics/VictoriaMetrics) +[![Build Status](https://github.com/VictoriaMetrics/VictoriaMetrics/workflows/main/badge.svg)](https://github.com/VictoriaMetrics/VictoriaMetrics/actions) [![codecov](https://codecov.io/gh/VictoriaMetrics/VictoriaMetrics/branch/master/graph/badge.svg)](https://codecov.io/gh/VictoriaMetrics/VictoriaMetrics) Victoria Metrics