tunasync.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: tunasync
  2. on: [push]
  3. jobs:
  4. build:
  5. name: Build
  6. runs-on: ubuntu-latest
  7. steps:
  8. - name: Set up Go 1.13
  9. uses: actions/setup-go@v1
  10. with:
  11. go-version: 1.13
  12. id: go
  13. - name: Check out code into the Go module directory
  14. uses: actions/checkout@v2
  15. - name: Get dependencies
  16. run: |
  17. go get -v -t -d ./cmd/tunasync
  18. go get -v -t -d ./cmd/tunasynctl
  19. - name: Build
  20. run: |
  21. make tunasync
  22. make tunasynctl
  23. test:
  24. name: Test
  25. runs-on: ubuntu-latest
  26. steps:
  27. - name: Setup test dependencies
  28. run: |
  29. sudo apt update
  30. sudo apt install -y cgroup-bin
  31. /usr/bin/docker pull alpine
  32. /usr/bin/docker images
  33. lssubsys -am
  34. sudo cgcreate -a $USER -t $USER -g cpu:tunasync
  35. sudo cgcreate -a $USER -t $USER -g memory:tunasync
  36. - name: Set up Go 1.13
  37. uses: actions/setup-go@v1
  38. with:
  39. go-version: 1.13
  40. id: go
  41. - name: Check out code into the Go module directory
  42. uses: actions/checkout@v2
  43. - name: Run Unit tests.
  44. run: make test
  45. - name: Convert coverage to lcov
  46. uses: jandelgado/gcov2lcov-action@v1.0.0
  47. with:
  48. infile: profile.cov
  49. outfile: coverage.lcov
  50. - name: Coveralls
  51. uses: coverallsapp/github-action@v1.0.1
  52. with:
  53. github-token: ${{ secrets.github_token }}
  54. path-to-lcov: coverage.lcov