ci.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: CI
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. name: Go ${{ matrix.go-version }} with Kafka ${{ matrix.kafka-version }} on Ubuntu
  6. runs-on: ubuntu-latest
  7. strategy:
  8. fail-fast: false
  9. matrix:
  10. go-version: [1.14.x]
  11. kafka-version: [2.4.1, 2.5.0]
  12. platform: [ubuntu-latest]
  13. env:
  14. DEBUG: true
  15. KAFKA_VERSION: ${{ matrix.kafka-version }}
  16. steps:
  17. - uses: actions/checkout@v1
  18. - name: Setup Go
  19. uses: actions/setup-go@v1
  20. with:
  21. go-version: ${{ matrix.go-version }}
  22. - uses: actions/cache@v1
  23. with:
  24. path: ~/go/pkg/mod
  25. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  26. restore-keys: |
  27. ${{ runner.os }}-go-
  28. # See https://github.com/actions/setup-go/issues/14
  29. - name: Setup env
  30. run: |
  31. echo "::set-env name=GOPATH::$(go env GOPATH)"
  32. echo "::add-path::$(go env GOPATH)/bin"
  33. shell: bash
  34. - name: Install dependencies
  35. run: |
  36. curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
  37. export REPOSITORY_ROOT=${GITHUB_WORKSPACE}
  38. - name: Run test suite
  39. run: make test_functional
  40. - name: Run linter
  41. run: make lint