4
0

test.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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-20.04
  13. strategy:
  14. matrix:
  15. go: [ '1.16', '1.17' ]
  16. steps:
  17. -
  18. name: Checkout
  19. uses: actions/checkout@v2
  20. -
  21. name: Setup Go
  22. uses: actions/setup-go@v2
  23. with:
  24. go-version: ${{ matrix.go }}
  25. -
  26. name: Install Deps
  27. id: install-deps
  28. run: sudo apt-get -y install libpcsclite-dev
  29. -
  30. name: golangci-lint
  31. uses: golangci/golangci-lint-action@v2
  32. with:
  33. # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
  34. version: 'v1.44.0'
  35. # Optional: working directory, useful for monorepos
  36. # working-directory: somedir
  37. # Optional: golangci-lint command line arguments.
  38. args: --timeout=30m
  39. # Optional: show only new issues if it's a pull request. The default value is `false`.
  40. # only-new-issues: true
  41. # Optional: if set to true then the action will use pre-installed Go.
  42. # skip-go-installation: true
  43. # Optional: if set to true then the action don't cache or restore ~/go/pkg.
  44. # skip-pkg-cache: true
  45. # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
  46. # skip-build-cache: true
  47. -
  48. name: Test, Build
  49. id: lint_test_build
  50. run: V=1 make ci
  51. -
  52. name: Codecov
  53. if: matrix.go == '1.17'
  54. uses: codecov/codecov-action@v1.2.1
  55. with:
  56. file: ./coverage.out # optional
  57. name: codecov-umbrella # optional
  58. fail_ci_if_error: true # optional (default = false)