Skip to content

Commit

Permalink
chore: use actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfogre committed Oct 24, 2023
1 parent 5594286 commit a743078
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 17 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
push:
branches: [ "master" ]
tags: [ "v*" ]
pull_request:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.18'

- name: Format
run: gofmt -l . && test -z "$(gofmt -l .)"

- name: Build
run: go build -v ./...

- name: Test
run: go test -race -coverprofile=coverage.out -covermode=atomic

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Vet
run: go vet -v ./...

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# pt

[![Build Status](https://travis-ci.com/gochore/pt.svg?branch=master)](https://travis-ci.com/gochore/pt)
[![codecov](https://codecov.io/gh/gochore/pt/branch/master/graph/badge.svg)](https://codecov.io/gh/gochore/pt)
[![Go Reference](https://pkg.go.dev/badge/github.com/gochore/pt.svg)](https://pkg.go.dev/github.com/gochore/pt)
[![Actions](https://github.com/gochore/pt/actions/workflows/test.yaml/badge.svg)](https://github.com/gochore/pt/actions)
[![Codecov](https://codecov.io/gh/gochore/pt/branch/master/graph/badge.svg)](https://codecov.io/gh/gochore/pt)
[![Go Report Card](https://goreportcard.com/badge/github.com/gochore/pt)](https://goreportcard.com/report/github.com/gochore/pt)
[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gochore/pt)](https://github.com/gochore/pt/blob/master/go.mod)
[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/gochore/pt)](https://github.com/gochore/pt/releases)
Expand Down

0 comments on commit a743078

Please sign in to comment.