go.yml 794 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: "go: build binary"
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. concurrency:
  8. group: ${{ github.head_ref }}/go
  9. cancel-in-progress: true
  10. jobs:
  11. build:
  12. name: Build
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Set up Go 1.x
  16. uses: actions/setup-go@v2
  17. with:
  18. go-version: ^1.13
  19. id: go
  20. - name: Check out code into the Go module directory
  21. uses: actions/checkout@v2
  22. - name: Get dependencies
  23. run: |
  24. cd weed; go get -v -t -d ./...
  25. if [ -f Gopkg.toml ]; then
  26. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  27. dep ensure
  28. fi
  29. - name: Build
  30. run: cd weed; go build -v .
  31. - name: Test
  32. run: cd weed; go test -v ./...