test.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Lint, Test, Build
  2. on:
  3. push:
  4. tags-ignore:
  5. - 'v*'
  6. branches:
  7. - "**"
  8. pull_request:
  9. jobs:
  10. lintTestBuild:
  11. name: Lint, Test, Build
  12. runs-on: ubuntu-latest
  13. steps:
  14. -
  15. name: Checkout
  16. uses: actions/checkout@v2
  17. -
  18. name: Setup Go
  19. uses: actions/setup-go@v2
  20. with:
  21. go-version: '1.15.6'
  22. -
  23. name: Install Deps
  24. id: install-deps
  25. run: sudo apt-get -y install libpcsclite-dev
  26. -
  27. name: golangci-lint
  28. uses: golangci/golangci-lint-action@v2
  29. with:
  30. # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
  31. version: 'latest'
  32. # Optional: working directory, useful for monorepos
  33. # working-directory: somedir
  34. # Optional: golangci-lint command line arguments.
  35. # args: --issues-exit-code=0
  36. # Optional: show only new issues if it's a pull request. The default value is `false`.
  37. # only-new-issues: true
  38. # Optional: if set to true then the action will use pre-installed Go.
  39. # skip-go-installation: true
  40. # Optional: if set to true then the action don't cache or restore ~/go/pkg.
  41. # skip-pkg-cache: true
  42. # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
  43. # skip-build-cache: true
  44. -
  45. name: Test, Build
  46. id: lint_test_build
  47. run: V=1 make ci
  48. -
  49. name: Codecov
  50. uses: codecov/codecov-action@v1.2.1
  51. with:
  52. token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
  53. file: ./coverage.out # optional
  54. name: codecov-umbrella # optional
  55. fail_ci_if_error: true # optional (default = false)