build-test.yml 1.0 KB

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