Skip to content

Commit

Permalink
Using github workflow instead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
zenthangplus committed Aug 20, 2022
1 parent 76d9bd2 commit ea06bcf
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 17 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

name: run tests

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.14.x
- name: Checkout code
uses: actions/checkout@v2
- name: Run linters
uses: golangci/golangci-lint-action@v2
with:
version: v1.46.2

test:
strategy:
matrix:
go-version: [ 1.10.x, 1.12.x, 1.13.x, 1.14.x, 1.16.x, 1.17.x, 1.18.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
run: go test -v -covermode=count

coverage:
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: 1.14.x
- name: Checkout code
uses: actions/checkout@v2
- name: Calculate coverage
run: |
go test -v -covermode=atomic -coverprofile=coverage.txt
- name: Upload coverage report
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_ACCESS_TOKEN }}
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
16 changes: 0 additions & 16 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,6 +1,6 @@
# Golang Concurrency Manager

[![Build Status](https://travis-ci.com/zenthangplus/goccm.svg?branch=master)](https://travis-ci.com/zenthangplus/goccm)
[![run tests](https://github.com/zenthangplus/goccm/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/zenthangplus/goccm/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/zenthangplus/goccm/branch/master/graph/badge.svg)](https://codecov.io/gh/zenthangplus/goccm)
[![goreportcard](https://goreportcard.com/badge/github.com/zenthangplus/goccm)](https://goreportcard.com/report/github.com/zenthangplus/goccm)

Expand Down

0 comments on commit ea06bcf

Please sign in to comment.