Skip to content

Commit

Permalink
feat: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluisq committed Feb 17, 2021
1 parent 9fb6a24 commit 1a366ec
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 25 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on: [push, pull_request]

env:
GO111MODULE: on
GOPROXY: "https://proxy.golang.org"

jobs:
test:
name: Testing
strategy:
fail-fast: false
matrix:
go: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os}}
steps:
- name: Install
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: Checkout
uses: actions/checkout@v2
- name: Tests
run: go test $(go list ./... | grep -v /examples) -v -timeout 30s -race -coverprofile=coverage.txt -covermode=atomic
- name: Coverage
uses: codecov/codecov-action@v1
with:
flags: unittests
verbose: true
name: codecov-cline
- name: Environment
id: vars
run: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
printf "\n\nGo environment:\n\n"
go env
printf "\n\nSystem environment:\n\n"
env
# Calculate the short SHA1 hash of the git commit
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
echo "::set-output name=go_cache::$(go env GOCACHE)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.vars.outputs.go_cache }}
key: ${{ runner.os }}-${{ matrix.go }}-go-ci-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go }}-go-ci
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CLIne [![Build Status](https://travis-ci.com/joseluisq/cline.svg?branch=master)](https://travis-ci.com/joseluisq/cline) [![codecov](https://codecov.io/gh/joseluisq/cline/branch/master/graph/badge.svg)](https://codecov.io/gh/joseluisq/cline) [![Go Report Card](https://goreportcard.com/badge/github.com/joseluisq/cline)](https://goreportcard.com/report/github.com/joseluisq/cline) [![PkgGoDev](https://pkg.go.dev/badge/github.com/joseluisq/cline)](https://pkg.go.dev/github.com/joseluisq/cline)
# CLIne ![CI](https://github.com/joseluisq/cline/workflows/CI/badge.svg) [![codecov](https://codecov.io/gh/joseluisq/cline/branch/master/graph/badge.svg)](https://codecov.io/gh/joseluisq/cline) [![Go Report Card](https://goreportcard.com/badge/github.com/joseluisq/cline)](https://goreportcard.com/report/github.com/joseluisq/cline) [![PkgGoDev](https://pkg.go.dev/badge/github.com/joseluisq/cline)](https://pkg.go.dev/github.com/joseluisq/cline)

> A fast and lightweight CLI package for Go without external dependencies.
Expand Down

0 comments on commit 1a366ec

Please sign in to comment.