go.yml 609 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: Go
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v4
  12. with:
  13. fetch-depth: 0
  14. - name: Set up Go
  15. uses: actions/setup-go@v5
  16. with:
  17. go-version: 1.21
  18. - uses: actions/cache@v4
  19. with:
  20. path: |
  21. ~/.cache/go-build
  22. ~/go/pkg/mod
  23. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  24. restore-keys: |
  25. ${{ runner.os }}-go-
  26. - name: Build
  27. run: make build
  28. - name: Test
  29. run: make test