From 6fe41429ceaa0e76f17f4258128eb632733b8315 Mon Sep 17 00:00:00 2001 From: Marat Reymers Date: Tue, 21 Jun 2022 00:20:33 +0300 Subject: [PATCH] Migrate to github actions from travis-ci --- .github/workflows/ci.yaml | 38 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 16 ---------------- README.md | 2 +- 3 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..4134e9e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,38 @@ +name: CI +on: + workflow_dispatch: + inputs: + debug_ssh: + description: "Enable SSH debug with tmate, see https://github.com/marketplace/actions/debugging-with-tmate" + required: false + type: boolean + default: false + pull_request: + push: + branches: + - master + schedule: + - cron: "0 0 * * 1" # Every Monday + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + ci: + name: CI + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version: "1.x" + + - name: Debug with tmate SSH if enabled + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_ssh }} + uses: mxschmitt/action-tmate@v3 + + - run: make ci + + - uses: codecov/codecov-action@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9934197..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: go -os: linux -dist: xenial -go: - - 1.12.x - - 1.13.x - - 1.14.x -jobs: - include: - - go: 1.x - script: - - make ci - after_success: - - bash <(curl -s https://codecov.io/bash) -script: - - GO111MODULE=on make test diff --git a/README.md b/README.md index b768581..ba939ff 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# testpackage
[![Build Status](https://travis-ci.com/maratori/testpackage.svg?branch=master)](https://travis-ci.com/maratori/testpackage) [![codecov](https://codecov.io/gh/maratori/testpackage/branch/master/graph/badge.svg)](https://codecov.io/gh/maratori/testpackage) [![codebeat badge](https://codebeat.co/badges/9c74d700-ebf8-4b76-8405-1950874576c4)](https://codebeat.co/projects/github-com-maratori-testpackage-master) [![Maintainability](https://api.codeclimate.com/v1/badges/bf753d7560c8e4aa5cf0/maintainability)](https://codeclimate.com/github/maratori/testpackage/maintainability) [![Go Report Card](https://goreportcard.com/badge/github.com/maratori/testpackage)](https://goreportcard.com/report/github.com/maratori/testpackage) [![GitHub](https://img.shields.io/github/license/maratori/testpackage.svg)](LICENSE) [![GoDoc](https://godoc.org/github.com/maratori/testpackage?status.svg)](http://pkg.go.dev/github.com/maratori/testpackage) +# testpackage
[![CI](https://github.com/maratori/testpackage/actions/workflows/ci.yaml/badge.svg)](https://github.com/maratori/testpackage/actions/workflows/ci.yaml) [![codecov](https://codecov.io/gh/maratori/testpackage/branch/master/graph/badge.svg)](https://codecov.io/gh/maratori/testpackage) [![codebeat badge](https://codebeat.co/badges/9c74d700-ebf8-4b76-8405-1950874576c4)](https://codebeat.co/projects/github-com-maratori-testpackage-master) [![Maintainability](https://api.codeclimate.com/v1/badges/bf753d7560c8e4aa5cf0/maintainability)](https://codeclimate.com/github/maratori/testpackage/maintainability) [![Go Report Card](https://goreportcard.com/badge/github.com/maratori/testpackage)](https://goreportcard.com/report/github.com/maratori/testpackage) [![GitHub](https://img.shields.io/github/license/maratori/testpackage.svg)](LICENSE) [![GoDoc](https://godoc.org/github.com/maratori/testpackage?status.svg)](http://pkg.go.dev/github.com/maratori/testpackage) **testpackage** is a golang linter that makes you use a separate `_test` package.