diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..0186fe0 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,31 @@ +name: test +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + name: go + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go: ['1.13', '1.14', '1.15'] + steps: + - name: setup + uses: actions/setup-go@v2 + with: + go-version: ${{matrix.go}} + + - name: checkout + uses: actions/checkout@v2 + + - name: tools + run: go get golang.org/x/lint/golint + + - name: test + run: make + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5241c12..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -go: - - "1.12.x" - - "1.13.x" - - "1.14.x" -install: - - go get golang.org/x/lint/golint - - go get -v -t . -script: - - make -notification: - email: change diff --git a/README.md b/README.md index fef73ef..a678d8f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Trie [![Build Status](https://travis-ci.org/dghubble/trie.svg?branch=master)](https://travis-ci.org/dghubble/trie) [![Coverage](https://gocover.io/_badge/github.com/dghubble/trie)](https://gocover.io/github.com/dghubble/trie) [![GoDoc](https://godoc.org/github.com/dghubble/trie?status.svg)](https://godoc.org/github.com/dghubble/trie) +# Trie [![Build Status](https://github.com/dghubble/trie/workflows/test/badge.svg)](https://github.com/dghubble/trie/actions?query=workflow%3Atest+branch%3Amaster) [![Coverage](https://gocover.io/_badge/github.com/dghubble/trie)](https://gocover.io/github.com/dghubble/trie) [![GoDoc](https://godoc.org/github.com/dghubble/trie?status.svg)](https://godoc.org/github.com/dghubble/trie) Package `trie` implements rune-wise and path-wise [Tries](https://en.wikipedia.org/wiki/Trie) optimized for `Get` performance and to allocate 0 bytes of heap memory (i.e. garbage) per `Get`. A typical use case is to perform any `Put` or `Delete` operations upfront to populate the trie, then perform `Get` operations very quickly. The Tries do not synchronize access (not thread-safe). -When Tries are chosen over maps, it is typically for their space efficiency. However, in situations where direct key lookup is not possible (e.g. routers), tries can provide faster lookups and avoid key iteration. +When Tries are chosen over maps, it is typically for their space efficiency. However, in situations where direct key lookup is not possible (e.g. routers), tries can provide faster lookups and avoid key iteration. ## Install