name: Test on: pull_request: branches: [ main ] jobs: build: name: PR Test runs-on: ubuntu-latest steps: - name: Lanuch Pulsar run : docker run -d -p 6650:6650 -p 8080:8080 apachepulsar/pulsar:2.6.0 bin/pulsar standalone - name: Launch Etcd run : | docker run -d -p 2379:2379 -p 2380:2380 --name etcd \ quay.io/coreos/etcd:v3.4.9 etcd \ --name node1 \ --initial-advertise-peer-urls http://127.0.0.1:2380 \ --listen-peer-urls http://0.0.0.0:2380 \ --advertise-client-urls http://127.0.0.1:2379 \ --listen-client-urls http://0.0.0.0:2379 \ --initial-cluster node1=http://127.0.0.1:2380 - name: Set up Go 1.x uses: actions/setup-go@v2 with: go-version: ^1.14 - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Get dependencies run: | go get -v -t -d ./... if [ -f Gopkg.toml ]; then curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure fi go get gotest.tools/gotestsum - name: Run Test run: | pushd internal/kv go test -v ./... popd pushd internal/msgstream go test -v ./... popd pushd internal/master go test -v ./... popd # - name: Send test to codecov # env: # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # run: bash <(curl -s https://codecov.io/bash)