name: Run tests on: pull_request: branches: - master jobs: test: name: Test runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Set up Go 1.14 uses: actions/setup-go@v2 with: go-version: 1.14 id: go - name: Check out code into the Go module directory uses: actions/checkout@master - name: Running go tests env: GO111MODULE: on run: make test examples: name: Build examples runs-on: ubuntu-latest steps: - name: Set up Go 1.14 uses: actions/setup-go@v2 with: go-version: 1.14 id: go - name: Check out code into the Go module directory uses: actions/checkout@master - name: Building go examples env: GO111MODULE: on run: ./_example/build.sh lint: name: Run lint checks runs-on: ubuntu-latest steps: - name: Set up Go 1.14 uses: actions/setup-go@v2 with: go-version: 1.14 id: go - name: Check out code into the Go module directory uses: actions/checkout@master - name: Download golangci-lint run: | wget https://github.com/golangci/golangci-lint/releases/download/v1.20.1/golangci-lint-1.20.1-linux-amd64.tar.gz tar -xvf ./golangci-lint-1.20.1-linux-amd64.tar.gz - name: Running golangci-lint env: GO111MODULE: on GOPATH: /home/runner/work/ run: GOCILINT=${GOPATH}/bin/golangci-lint make lint