ci.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Continuous integration
  2. on: [push]
  3. jobs:
  4. lint:
  5. name: Lint
  6. runs-on: ubuntu-latest
  7. env:
  8. GO111MODULE: "on"
  9. steps:
  10. - name: Set up Go 1.15
  11. uses: actions/setup-go@v1
  12. with:
  13. go-version: 1.15
  14. id: go
  15. - name: Checkout code into the Go module directory
  16. uses: actions/checkout@v2
  17. - name: Validate go-mod is up-to-date and license headers
  18. run: make validate
  19. - name: Validate imports
  20. run: make import-restrictions
  21. - name: Run golangci-lint
  22. run: |
  23. curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b . v1.30.0
  24. ./golangci-lint run --timeout 10m0s
  25. build:
  26. name: Build
  27. runs-on: ubuntu-latest
  28. env:
  29. GO111MODULE: "on"
  30. steps:
  31. - name: Set up Go 1.15
  32. uses: actions/setup-go@v1
  33. with:
  34. go-version: 1.15
  35. id: go
  36. - name: Checkout code into the Go module directory
  37. uses: actions/checkout@v2
  38. - uses: actions/cache@v2
  39. with:
  40. path: ~/go/pkg/mod
  41. key: go-${{ hashFiles('**/go.sum') }}
  42. - name: Test
  43. env:
  44. BUILD_TAGS: example,local,ecs
  45. run: make -f builder.Makefile test
  46. - name: Build
  47. env:
  48. BUILD_TAGS: example,local,ecs
  49. run: make -f builder.Makefile cli
  50. - name: E2E Test
  51. run: make e2e-local