diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..54793fe --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Test +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + unit: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Run tests + run: go test -v ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1ef96cc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go -go: - - "1.7.X" - - "1.8.X" - - "1.9.X" - - "1.10.X" - - master - -matrix: - allow_failures: - - go: master -fast_finish: true - -script: - - go test -v ./...