coverity.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. # Runs coverity-scan.sh every 24h on `master`
  3. name: Coverity Scan
  4. on:
  5. schedule:
  6. - cron: '0 1 * * *'
  7. pull_request:
  8. paths:
  9. - .github/workflows/coverity.yml
  10. - packaging/utils/coverity-scan.sh
  11. env:
  12. DISABLE_TELEMETRY: 1
  13. concurrency:
  14. group: coverity-${{ github.ref }}
  15. cancel-in-progress: true
  16. jobs:
  17. coverity:
  18. if: github.repository == 'netdata/netdata'
  19. runs-on: ubuntu-latest
  20. steps:
  21. - name: Checkout
  22. uses: actions/checkout@v4
  23. id: checkout
  24. with:
  25. submodules: recursive
  26. - name: Prepare environment
  27. id: prepare
  28. env:
  29. DEBIAN_FRONTEND: 'noninteractive'
  30. run: |
  31. ./packaging/installer/install-required-packages.sh \
  32. --dont-wait --non-interactive netdata
  33. sudo apt-get install -y libjson-c-dev libyaml-dev libipmimonitoring-dev \
  34. libcups2-dev libsnappy-dev libprotobuf-dev \
  35. libprotoc-dev libssl-dev protobuf-compiler \
  36. libnetfilter-acct-dev libmongoc-dev libxen-dev \
  37. libsystemd-dev ninja-build
  38. - name: Run coverity-scan
  39. id: run
  40. env:
  41. REPOSITORY: 'netdata/netdata'
  42. COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
  43. COVERITY_SCAN_SUBMIT_MAIL: ${{ secrets.COVERITY_SCAN_SUBMIT_MAIL }}
  44. run: |
  45. bash -x ./packaging/utils/coverity-scan.sh --with-install
  46. - name: Failure Notification
  47. uses: rtCamp/action-slack-notify@v2
  48. env:
  49. SLACK_COLOR: 'danger'
  50. SLACK_FOOTER: ''
  51. SLACK_ICON_EMOJI: ':github-actions:'
  52. SLACK_TITLE: 'Coverity run failed:'
  53. SLACK_USERNAME: 'GitHub Actions'
  54. SLACK_MESSAGE: |-
  55. ${{ github.repository }}: Coverity failed to run correctly.
  56. Checkout: ${{ steps.checkout.outcome }}
  57. Environment preparation: ${{ steps.prepare.outcome }}
  58. Coverity run: ${{ steps.run.outcome }}
  59. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  60. if: ${{
  61. failure()
  62. && github.event_name != 'pull_request'
  63. && startsWith(github.ref, 'refs/heads/master')
  64. }}