You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
782 B

  1. name: CI
  2. on:
  3. pull_request:
  4. paths:
  5. - '**.go'
  6. - 'go.mod'
  7. - 'go.sum'
  8. branches:
  9. - master
  10. push:
  11. paths:
  12. - '**.go'
  13. - 'go.mod'
  14. - 'go.sum'
  15. branches:
  16. - master
  17. tags-ignore:
  18. - '**'
  19. jobs:
  20. test:
  21. name: Run the tests
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Checkout code
  25. uses: actions/checkout@v2
  26. - name: Setup Go
  27. uses: actions/setup-go@v2
  28. with:
  29. go-version: '~1.18.0'
  30. - name: Install libolm
  31. run: sudo apt-get -y install libolm3 libolm-dev
  32. - name: Install linters
  33. run: |
  34. go install honnef.co/go/tools/cmd/staticcheck@latest
  35. go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
  36. - name: Lint and test
  37. run: sh ./hooks/pre-commit