diff --git a/.github/actions/test.yml b/.github/actions/test.yml new file mode 100644 index 0000000..1b02251 --- /dev/null +++ b/.github/actions/test.yml @@ -0,0 +1,30 @@ +on: [push, pull_request] +name: Test + +jobs: + test: + strategy: + matrix: + go-version: ['1.13', '1.14', '1.15'] + 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: Install make on Windows + if: matrix.os == 'windows-latest' + run: choco install make + - name: Checkout code + uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Test + run: | + go test -race ./... + make diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6af09e9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: go - -go: - #- "1.11" # Debian Stable golang version, fails - see below - #- "1.12" # Also fails due to progressbar Millisecond requirement - - "1.13" - - "1.14" - - "1.15" - -os: - - linux - - osx - - windows - -before_install: - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi - -script: - - go test -race ./... - - make - -env: - GO111MODULE=on - -cache: - directories: - - $GOCACHE - - $GOPATH/pkg/mod - -# TODO: GitHub Releases deploy - -notifications: - email: - on_success: never - on_failure: always