Skip to content

Commit

Permalink
Added Github actions
Browse files Browse the repository at this point in the history
- Removed travis
  • Loading branch information
agnivade committed May 21, 2021
1 parent 51ec67d commit ab363df
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: [push, pull_request]
name: CI
jobs:
test:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Lint
run: make lint
- name: Test
run: make test
- name: Install
run: make install
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ install:
go install

lint:
gofmt -l -s -w . && go vet . && golint -set_exit_status=1 .
gofmt -l -s -w . && go vet .

test: # The first 2 go gets are to support older Go versions
go get github.com/arbovm/levenshtein
go get github.com/dgryski/trifles/leven
GO111MODULE=on go test -race -v -coverprofile=coverage.txt -covermode=atomic
test:
go test -race -v -coverprofile=coverage.txt -covermode=atomic

bench:
go test -run=XXX -bench=. -benchmem -count=5

0 comments on commit ab363df

Please sign in to comment.