lint.yml 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: Lint
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - develop
  7. pull_request:
  8. branches:
  9. - master
  10. - develop
  11. jobs:
  12. unit-test:
  13. strategy:
  14. matrix:
  15. go-version: [1.17.x]
  16. os: [ubuntu-18.04]
  17. runs-on: ${{ matrix.os }}
  18. steps:
  19. - name: Install Go
  20. uses: actions/setup-go@v2
  21. with:
  22. go-version: ${{ matrix.go-version }}
  23. - name: Checkout code
  24. uses: actions/checkout@v2
  25. - uses: actions/cache@v2
  26. with:
  27. # In order:
  28. # * Module download cache
  29. # * Build cache (Linux)
  30. # * Build cache (Mac)
  31. # * Build cache (Windows)
  32. path: |
  33. ~/go/pkg/mod
  34. ~/.cache/go-build
  35. ~/Library/Caches/go-build
  36. %LocalAppData%\go-build
  37. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  38. restore-keys: |
  39. ${{ runner.os }}-go-
  40. - name: Lint
  41. run: |
  42. make lint