From 3a9130f54b49e9708a0e661b154c5db87f3e2c1a Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com> Date: Tue, 19 May 2020 21:58:46 +0200 Subject: [PATCH] Add ci/cd GH actions Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com> --- .github/workflows/main.yml | 50 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 18 -------------- README.md | 2 +- 3 files changed, 51 insertions(+), 19 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..1233f91 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,50 @@ +name: CI + +on: + pull_request: + push: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Run golangci-lint + uses: actions-contrib/golangci-lint@v1 + - name: Run tests and attempt building + run: | + export PATH=$(go env GOPATH)/bin:$PATH + go test -mod vendor -v -race ./... + go build -mod vendor +--- +name: goreleaser + +on: + push: + tags: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Unshallow + run: git fetch --prune --unshallow + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.14 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 54b1208..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go - -go: - - "1.12.x" - - "1.13.x" - -os: - - linux - - darwin - - windows - -go_import_path: github.com/pierre-emmanuelJ/iptv-proxy - -env: - - GO111MODULE=on - -script: - - go build -mod=vendor diff --git a/README.md b/README.md index 98f8447..64645db 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Iptv Proxy -[![Build Status](https://travis-ci.com/pierre-emmanuelJ/iptv-proxy.svg?branch=master)](https://travis-ci.com/pierre-emmanuelJ/iptv-proxy) +[![Actions Status](https://github.com/exoscale/iptv-proxy/workflows/CI/badge.svg)](https://github.com/exoscale/iptv-proxy/actions?query=workflow%3ACI) ## Description