diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4741b535c40db7fbcb286b461c8e21d64dee87c8..0000000000000000000000000000000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2 -jobs: - build: - docker: - - image: circleci/golang:1.13 - steps: - - checkout - - - run: go test -v -cover -coverprofile=coverage.txt ./... - - run: bash <(curl -s https://codecov.io/bash) - - - run: .circleci/build-examples - - run: .circleci/check-gofmt diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000000000000000000000000000000000..11e5f46e69c7824cd34ae3b59ae74e401a2f02bc --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +on: [push, pull_request] +name: tests +jobs: + test: + strategy: + matrix: + go-version: [1.13.x, 1.14.x] + platform: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + run: go test -v -cover -coverprofile=coverage.txt ./... + - name: Vet + run: go vet ./... + - name: Build examples + run: scripts/build_examples.sh + - name: Build examples + run: scripts/check_gofmt.sh + # Upload Coverage Report + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.txt + flags: unittests + name: codecov-${{ matrix.platform }}-${{ matrix.go-version }} + fail_ci_if_error: true diff --git a/.circleci/build-examples b/scripts/build_examples.sh similarity index 100% rename from .circleci/build-examples rename to scripts/build_examples.sh diff --git a/.circleci/check-gofmt b/scripts/check_gofmt.sh similarity index 100% rename from .circleci/check-gofmt rename to scripts/check_gofmt.sh